Skip to content

Instantly share code, notes, and snippets.

@zapsleep
Created July 29, 2013 08:09
Show Gist options
  • Save zapsleep/6102819 to your computer and use it in GitHub Desktop.
Save zapsleep/6102819 to your computer and use it in GitHub Desktop.
Gesture Handler for DVParallaxView
#pragma mark - Gesture handler
- (void)panHandler:(UIPanGestureRecognizer *)pan {
CGPoint translation = [pan translationInView:self];
[self setContentOffset:CGPointMake(self.contentOffset.x + translation.x,
self.contentOffset.y - translation.y)];
[pan setTranslation:CGPointZero inView:self];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment