禁止scrollView左滑的方法:
- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
if (scrollView.contentOffset.x>0){
[scrollView setContentOffset:CGPointMake(0, scrollView.contentOffset.y) animated:NO];
}
}
禁止scrollView左滑的方法:
[_scrollView setContentSize:CGSizeMake(MAX(_maxWidth, _scrollView.bounds.size.width), 0)];
_scrollView.scrollEnabled=NO;
网友评论