I Know filtering oneTap/doubleTap using a Apple API. code are follows.
UITapGestureRecognizer *doubleTapGestureRecognizer = [[UITapGestureRecognizer alloc]
Here's a simpler answer to this problem, if you already have an action attached to the button or view. First, change the IBAction so that it includes the UIEvent (don't forget to reconnect it to your button or view in the Storyboard):
-(IBAction)buttonAction:(id)sender forEvent:(UIEvent*)event
Next, in your you can capture the touches from the event, and then easily test for the tap count:
-(IBAction)buttonAction:(id)sender forEvent:(UIEvent*)event {
UITouch* firstTouch = nil;
if ((nil != ((firstTouch = event.allTouches.allObjects.firstObject)))
&& (2 == firstTouch.tapCount))
{
// do something for double-tap
} else {
// do something for single-tap
}
}
You can extend this solution with other cases for different event parameters, such as long taps.