弹出窗口未显示在WKWebview中

时间:2019-12-21 08:38:43

标签: swift wkwebview

var wkWebView:WKWebView!

public override func viewDidLoad() {
    super.viewDidLoad()

    wkWebView = WKWebView(frame: view.bounds, configuration: WKWebViewConfiguration())
    wkWebView.uiDelegate = self
    wkWebView.navigationDelegate = self
    view.addSubview(wkWebView!)
    let url = URL(string: "https://lendsend.tomorrowx.net/index.html")!
    wkWebView.load(URLRequest(url: url))
}

注意:请在浏览器中点击以下网址“ https://lendsend.tomorrowx.net/index.html”以得到预期的结果。

0 个答案:

没有答案