iOS: Is there a way to determine which UIControlEvent the sender came from?
I'm routing different UIControlEvent to one event handler. Wondering is there a way to determine which UIControlEvent the sender came from? e.g. (Touch Up Inside, Edit开发者_如何学Pythoning Did Begin, etc...)
- (IBAction) MultipleEvents: (UITextField *)sender {
NSLog(@"Hello World");
}
You can set up a second parameter UIEvent* which is going to have a "type".
- (void)action:(id)sender forEvent:(UIEvent *)event;
精彩评论