UIWebView禁止滚动

for (id subview in webView.subviews){  //webView是要被禁止滚动和回弹的UIWebView

if ([[subview class] isSubclassOfClass: [UIScrollView class]])

((UIScrollView *)subview).scrollEnabled = NO;

}

UIView *scrollerView = [self.subviews objectAtIndex:0];

self 为一个uiwebview

然后scrollView.scrollEnabled = NO;

wscrollView.bounces = NO;

webView.scrollView.scrollEnabled = NO;

webView.scrollView.bounces = NO;
0

这篇文章还没有评论

发表评论