Disable Scroll on a UIWebView allowed?

后端 未结 18 1473
深忆病人
深忆病人 2020-12-07 11:52

I have to show a web article with a UITableView under the article.

The only option I found was to display the article in a UIWebView in the

18条回答
  •  一生所求
    2020-12-07 12:29

    for all ios versions you can use this code instead of setScrollEnabled :

    for (UIView *view in webview.subviews) {
        if ([view isKindOfClass:[UIScrollView class]]) {
           UIScrollView *scrollView = (UIScrollView *)view;
           scrollView.scrollEnabled = NO;
        }
    }
    

提交回复
热议问题