UIWebView stringByEvaluatingJavaScriptFromString in background

前端 未结 4 1441
温柔的废话
温柔的废话 2021-02-10 01:29

In an iOS app, I\'m running a fairly large script on a UIWebView using stringByEvaluatingJavaScriptFromString (large in terms of the length of the java

4条回答
  •  孤独总比滥情好
    2021-02-10 02:16

    You could try putting that call into an NSOperation. Since you are working with a UI element, be sure to use the [NSOperationQueue mainQueue].

提交回复
热议问题