I have a UIPanGestureRecognizer I am using to track an object (UIImageView) below a user\'s finger. I only care about motion on the X axis, and if
This little trick works for me.
@implementation UIGestureRecognizer (Cancel)
- (void)cancel {
self.enabled = NO;
self.enabled = YES;
}
@end
From the UIGestureRecognizer @enabled documentation:
Disables a gesture recognizers so it does not receive touches. The default value is YES. If you change this property to NO while a gesture recognizer is currently recognizing a gesture, the gesture recognizer transitions to a cancelled state.