Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (BOOL) gestureRecognizer: (UIGestureRecognizer*)gestureRecognizer
- shouldRecognizeSimultaneouslyWithGestureRecognizer: (UIGestureRecognizer*)otherGestureRecognizer
- {
- if ([gestureRecognizer isKindOfClass: [UIPanGestureRecognizer class]])
- {
- if ([((UIPanGestureRecognizer*)gestureRecognizer) velocityInView: self].y > 0)
- {
- // Up
- if (self.contentOffset.y <= 0)
- {
- self.bounces = NO;
- return YES;
- }
- }
- else
- {
- // Down
- if (self.contentOffset.y + self.height >= self.contentSize.height)
- {
- self.bounces = NO;
- return YES;
- }
- }
- }
- self.bounces = YES;
- return NO;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement