I want to prevent UIGestureRecognizers working simultaneously, so I implemented the method below. However, I would only like to allow the otherGestureRecognizer to work on it’s own while the gestureRecognizer is attempting to recognise simultaneously.
Please can you tell me how I can achieve that?
Btw, this is to prevent the view from panning (dragging) down while the tableView is in ‘deletion mode’.
- (BOOL) gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
gestureRecognizer.enabled = NO;
return NO;
}
Your question is a bit unclear but I think you might be looking for:
From the UIGestureRecognizer docs