禁用滚动webview

Son*_*onu 2 iphone uiwebview

可能重复:
使用objective-c禁用UIWebView默认滚动行为

我想禁用我的webview滚动,我检查了所有属性,但我找不到任何对我有用的属性,如果有可能请帮助我.

谢谢.

Son*_*onu 5

检查此代码可能会有所帮助

UIView* row = nil;
for(row in webView.subviews){
    if([row isKindOfClass:[UIScrollView class] ]){
        UIScrollView* scrollRow = (UIScrollView*) row;
        scrollRow.scrollEnabled = NO;
        scrollRow.bounces = NO;
        scrollRow.backgroundColor=[UIColor clearColor];
    }
}
Run Code Online (Sandbox Code Playgroud)