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

-(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加载网页禁止左右滑动)