UIScrollView 禁止向左滑动

- (void)scrollViewDidScroll:(UIScrollView *)scrollView 

{

if (scrollView.contentOffset.x>0) {
     [scrollView setContentOffset:CGPointMake(0, scrollView.contentOffset.y) animated:NO];
   }

}



contentOffset.x > 0 向左滑动

你可能感兴趣的:(UIScrollView 禁止向左滑动)