How to disable scrolling entirely in a WKWebView?

前端 未结 10 1720
再見小時候
再見小時候 2020-12-28 14:07

I know this looks like a simple question one can simply say:

webview.scrollView.scrollEnabled = NO;
webview.scrollView.panGestureRecognizer.enabled = NO;
web         


        
10条回答
  •  醉酒成梦
    2020-12-28 14:50

    Before Swift 3

    You can simply disable scroll on its implicit scrollView

    webView.scrollView.scrollEnabled = false
    

    Swift 3

    webView.scrollView.isScrollEnabled = false
    

提交回复
热议问题