Created
January 15, 2014 17:19
-
-
Save klaaspieter/8440369 to your computer and use it in GitHub Desktop.
Triggering actions on controls using sendActionsForControlEvents: will not pass a `UIEvent` to action:forEvent:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@implementation ViewController | |
- (void)triggerAction; | |
{ | |
[self.button sendActionsForControlEvents:UIControlEventTouchUpInside]; | |
} | |
- (void)action:(id)sender forEvent:(UIEvent *)event; | |
{ | |
// event is UIEvent when triggered by a touch on the button. | |
// event is ViewControler when triggered using sendActionsForControlEvents: | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment