Created
July 29, 2013 08:09
-
-
Save zapsleep/6102819 to your computer and use it in GitHub Desktop.
Gesture Handler for DVParallaxView
This file contains 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
#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