How can I detect a double tap on a certain cell in UITableView
?
i.e. I want to perform one action if the user made a single touch and a
Improvement for oxigen answer.
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [touches anyObject];
if(touch.tapCount == 2) {
CGPoint touchPoint = [touch locationInView:self];
NSIndexPath *touchIndex = [self indexPathForRowAtPoint:touchPoint];
if (touchIndex) {
// Call some callback function and pass 'touchIndex'.
}
}
[super touchesEnded:touches withEvent:event];
}