Double tap on a button
问题 How can I add an action for a double tap on my button? 回答1: - (void) buttonTouchDownRepeat:(id)sender event:(UIEvent *)event { UITouch *touch = [[event allTouches] anyObject]; if(touch.tapCount == 2) { NSLog(@"Twice"); } else { NSLog(@"otherwise"); } } 回答2: In IB or code, connect an action to the button's UIControlEventTouchDownRepeat event. The action method should have a signature like this: - (void) buttonTouchDownRepeat:(id)sender event:(UIEvent *)event In the method's implementation, you