开发者

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

开发者 https://www.devze.com 2023-02-07 08:56 出处:网络
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

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;
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号