Skip to content

Instantly share code, notes, and snippets.

@smic
Created July 29, 2014 22:08
Show Gist options
  • Save smic/884bf62722f4bf926ba2 to your computer and use it in GitHub Desktop.
Save smic/884bf62722f4bf926ba2 to your computer and use it in GitHub Desktop.
Send control value back to controller over binding
@implementation NSControl (SMTriggerAction)
- (void)triggerAction {
[self sendAction:self.action to:self.target];
for (NSValueBinder *binder in [[self _bindingAdaptor] binders]) {
[binder performAction:self];
}
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment