How Do I Bind a UIButton Property to Another Property?
- by cygnl7
UIButton eventually inherits from NSObject, and NSObject implements NSKeyValueBindingCreation Protocol. So why can't I bind a UIButton's property to another class' property?
[myUIButton bind:@"enabled"
toObject:myOtherObject
withKeyPath:@"otherObjectBOOLProperty"
options:nil];
This results in the warning
'UIButton' may not respond to '-bind:toObject:withKeyPath:options:'
What I'm trying to do is bind the enabled state of my UIButton to myOtherObject.otherObjectBOOLProperty.