代码:
override func loadView() {
let webConfiguration = WKWebViewConfiguration()
webView = WKWebView(frame: .zero, configuration: webConfiguration)
webView?.uiDelegate = self as! WKUIDelegate
view = webView
}
override func viewDidLoad() {
super.viewDidLoad()
let url = URL (string: "https://www.hackingwithswift.com")
let request = URLRequest(url: url!)
webView?.load(request)
}
我正在使用WKWebView加载网页。它成功加载了网页。我无法与网页进行交互(例如单击按钮或链接)。我的代码出了什么问题。我们将寻求任何帮助。 >