Skip to content

Instantly share code, notes, and snippets.

@zmcartor
Created September 16, 2014 14:56
Show Gist options
  • Save zmcartor/b9d25d1c6319428d400c to your computer and use it in GitHub Desktop.
Save zmcartor/b9d25d1c6319428d400c to your computer and use it in GitHub Desktop.
ScrollView direction
- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView {
CGPoint translation = [scrollView.panGestureRecognizer translationInView:scrollView.superview];
if(translation.y > 0)
{
NSLog(@"dragging downwards!");
} else
{
NSLog(@"dragging up!");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment