uiwebview swift 3页面不滚动

时间:2017-03-22 17:47:16

标签: ios swift xcode webview uiwebview

我使用swift 3在xcode中创建了一个应用程序,但页面内容不滚动。 这是代码

override func viewDidLoad() {
    super.viewDidLoad()
    // Do any additional setup after loading the view, typically from a nib.
    let url = URL(string: "https://www.website.com");
    let response = URLRequest(url: url!)

    webView.loadRequest(response)

    webView.scalesPageToFit = true
    webView.isUserInteractionEnabled = true
    webView.scrollView.isScrollEnabled = true

}

以下是设置屏幕截图https://www.dropbox.com/s/hckond368czbk0c/Screenshot%202017-03-22%2022.49.09.png?dl=0

1 个答案:

答案 0 :(得分:0)

I rewrote your code but everything works perfectly. Try restarting xcode

enter image description hereenter image description here