webViewDidFinishLoad: Firing too soon?

前端 未结 2 411
无人共我
无人共我 2021-01-02 01:17

I\'m trying to transition between loading of different web pages by hiding the webView while it is loading a page. However, I\'m seeing that some image intensive websites a

2条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-02 01:24

    I've encountered this problem as well. Although I haven't found a solution, I've worked around the problem by introducing a 0.5 second delay before showing the UIWebView once the webViewDidFinishLoading delegate method is called.

    - (void)webViewDidFinishLoad:(UIWebView *)webView
    {
        [self performSelector:@selector(displayWebView) withObject:nil afterDelay:0.5];
    }
    

提交回复
热议问题