SimpleTwoWayBindingIOS icon indicating copy to clipboard operation
SimpleTwoWayBindingIOS copied to clipboard

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

Open anoopvm86 opened this issue 7 years ago • 2 comments

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

anoopvm86 avatar Mar 27 '18 06:03 anoopvm86

I think we need to expand the contracts for this.

manishkkatoch avatar Apr 02 '18 14:04 manishkkatoch

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.

malhal avatar Mar 22 '20 09:03 malhal