Skip to content

Instantly share code, notes, and snippets.

@psobko
Created August 28, 2013 16:17
Show Gist options
  • Save psobko/6367925 to your computer and use it in GitHub Desktop.
Save psobko/6367925 to your computer and use it in GitHub Desktop.
Detect which direction a UIScrollView is bouncing
-(void)scrollViewDidScroll:(UIScrollView *)scrollView
{
float scrollOffsetY = scrollView.contentOffset.y;
if(scrollOffsetY < 0)
{
//Pulling down
}
else if(scrollOffsetY > scrollView.contentSize.height - scrollView.frame.size.height)
{
//Pulling up
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment