Created
February 21, 2015 20:09
-
-
Save blixt/3b51b96a0e99fb5e3143 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (BOOL)gestureRecognizerShouldBegin:(UIPanGestureRecognizer *)recognizer { | |
if (recognizer != self.panGestureRecognizer) { | |
if ([super respondsToSelector:@selector(gestureRecognizerShouldBegin:)]) { | |
return [super gestureRecognizerShouldBegin:recognizer]; | |
} else { | |
return YES; | |
} | |
} | |
CGPoint translation = [recognizer translationInView:self]; | |
// Fail vertical swipes. | |
return (abs(translation.y) < abs(translation.x)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment