Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS: Is there a way to determine which UIControlEvent the sender came from?

Tags:

ios

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, Editing Did Begin, etc...)

- (IBAction) MultipleEvents: (UITextField *)sender {
    NSLog(@"Hello World");
}
like image 717
docchang Avatar asked Jan 28 '11 04:01

docchang


1 Answers

You can set up a second parameter UIEvent* which is going to have a "type".

- (void)action:(id)sender forEvent:(UIEvent *)event;
like image 90
seppo0010 Avatar answered Oct 01 '22 02:10

seppo0010