dispatch_async UIWebView loadrequest

前端 未结 2 369
陌清茗
陌清茗 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)
    
    0 讨论(0)
  • 2021-01-26 08:02

    Ok guys, I created a Worker in my Javascript code, so I can handle it like new threads but not in iOS (which was impossible to do using UIWebView). The solution is here: iOS Javascript Workers High CPU after terminate()

    0 讨论(0)
提交回复
热议问题