【发布时间】:2020-09-09 19:33:10
【问题描述】:
我有这个但不确定如何设置一个 6 秒的计时器,例如在 WKWebView 加载之后。我有这个代表didFinish navigation。我认为这行不通:
func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
showAlert()
}
func showAlert() {
let alert = UIAlertController(title: "Loaded ", message: "In webview currently", preferredStyle: UIAlertController.Style.alert)
self.present(alert, animated: true, completion: nil)
}
【问题讨论】:
-
这能回答你的问题吗? How to display UIAlertView after some time?