如何关闭UIWebView中的反弹

时间:2010-04-01 06:50:54

标签: iphone cocoa-touch uikit uiwebview

  

可能重复:
  Stop UIWebView from “bouncing” vertically?

你可以帮我关掉UIWebView中的反弹吗?因为当我们滚动它时,它会显示灰色背景的不必要空间。 提前谢谢。

1 个答案:

答案 0 :(得分:14)

你可以试试这个:

for (id subview in YourWebView.subviews){
    if ([[subview class] isSubclassOfClass: [UIScrollView class]])
        ((UIScrollView *)subview).bounces = NO;
}