I have a subclass of UITableView which I want to perform a different action depending on whether the user single taps a cell or double taps. The problem is that the double tap causes both events to fire.
I'm handling it like this:
and double tapping causes "single tap" and then "double tap" to print out.
Does anyone know of any way I can suppress the single tap to see if it's actually a double tap?
Thanks.
I'm handling it like this:
Code:
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
if(((UITouch *)[touches anyObject]).tapCount == 2) {
wasDoubleTap = YES;
NSLog(@"double tap");
}
else {
wasDoubleTap = NO;
NSLog(@"single tap");
}
[super touchesEnded:touches withEvent:event];
}
and double tapping causes "single tap" and then "double tap" to print out.
Does anyone know of any way I can suppress the single tap to see if it's actually a double tap?
Thanks.