dispatch_async UIWebView loadrequest

前端 未结 2 370
陌清茗
陌清茗 2021-01-26 07:24

I\'m loading a javascript which is in my App, the script will try to find a solution, which can takes some time. I don\'t want to wait more than 5 seconds for that solution, in

2条回答
  •  失恋的感觉
    2021-01-26 07:54

    Another UIWebView delegate func is missing in your code. You may want to add timer2.invalidate() in

    func webView(_ webView: UIWebView,
     didFailLoadWithError error: NSError)
    

提交回复
热议问题