美文网首页
-UIWebView加载网页禁止左右滑动

-UIWebView加载网页禁止左右滑动

作者: 不规则先生 | 来源:发表于2016-12-14 12:05 被阅读143次

-(void)scrollViewDidScroll:(UIScrollView *)scrollViewT{

CGPoint point = scrollView.contentOffset;

if (point.x > 0||point.x <0) {

scrollView.contentOffset = CGPointMake(0, point.y);//这里不要设置为CGPointMake(0, 0),这样我们在文章下面左右滑动的时候,就跳到文章的起始位置,不科学

}

}

相关文章

网友评论

      本文标题:-UIWebView加载网页禁止左右滑动

      本文链接:https://www.haomeiwen.com/subject/lkeimttx.html