开发者

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜