manishkkatoch / SimpleTwoWayBindingIOS

An ultra light, ultra simple two way binding library for IOS and Swift.
MIT License
165 stars 48 forks source link

What if i need to bind other properties on a UIControl? #2

Open anoopvm86 opened 6 years ago

anoopvm86 commented 6 years ago

What if i need to bind other properties on a UIControl?

manishkkatoch commented 6 years ago

I think we need to expand the contracts for this.

malhal commented 4 years ago

AppKit bindings take a property param so you could do that, e.g. the value property in this case:

[self.textField bind: NSValueBinding
                toObject:self.objectController
             withKeyPath:@"selection.firstName"
                 options:nil];

NSValueBinding is just a string constant of "value".

Then you also wouldn't need as many UIControl extensions.