1. 程式人生 > >禁止webview拖動

禁止webview拖動

//Before iOS 5
for (id subview in webView.subviews)
  if ([[subview class] isSubclassOfClass: [UIScrollView class]])
    ((UIScrollView *)subview).bounces = NO;
 
//After iOS 5
webView.scrollView.bounces = NO;