IPhone SendDelegateMessage failed to return after waiting 10 Secs

烂漫一生 提交于 2019-12-05 10:22:22

As it says: you take too long ;D
web view to english: " i called a delegate and it takes too long and I can't continue displaying HTML or running JS"

don't block the web view or it will complain after a while...

so doing a synchronous request? on the main thread? never do that

Better way:

- webView:... {
      dispatch_async(dispatch_get_global_queue(0,0), ^{
          //DO LONG RUNNING IN BG

          dispatch_sync(dispatch_get_main_queue(), ^{
              //update UI
          }
      }
}
santhosh kumar R

If you are using the UIWebView then we need to do this first before moving to the next view

webView.delegate = nil;
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!