I\'ve been unable to find an answer for this (maybe someone has hacked a solution together).
Is it possible to disable scrolling in a UIScrollView in one direction?
This works for me:
-(void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate{
scrollView.bounces = YES;
}
-(void)scrollViewDidScroll:(UIScrollView *)scrollView{
if (scrollView.contentOffset.y < 0) {
[scrollView setContentOffset:CGPointMake(0, 0)];
scrollView.bounces = NO;
}
if (scrollView.contentOffset.y == 0){
scrollView.bounces = YES;
}
else scrollView.bounces = YES;
}