How to disable UIWebview horizontal scrolling?

前端 未结 7 1220
长情又很酷
长情又很酷 2021-02-05 14:48

I\'ve tried disabling it by inserting:


into my HTML string, and a dozen variations of th

7条回答
  •  盖世英雄少女心
    2021-02-05 15:03

    Swift 5.0 solution:

    func webViewDidFinishLoad(_ webView: UIWebView) {
        webView.scrollView.contentSize = CGSize(width: webView.frame.size.width, height: webView.scrollView.contentSize.height)        
    }
    

提交回复
热议问题