- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
CGPoint newOffset = scrollView.contentOffset;
if (newOffset.y < 0) {
// scrolling to the left, reset offset
[scrollView setContentOffset:CGPointZero];
}
}
- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
CGPoint newOffset = scrollView.contentOffset;
if (newOffset.y < 0) {
// scrolling to the left, reset offset
[scrollView setContentOffset:CGPointZero];
}
}
本文标题:scrollview 单向禁止滑动
本文链接:https://www.haomeiwen.com/subject/njziixtx.html
网友评论