Created
August 28, 2013 16:17
-
-
Save psobko/6367925 to your computer and use it in GitHub Desktop.
Detect which direction a UIScrollView is bouncing
This file contains hidden or 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
-(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