Check if UIWebView is loaded

前端 未结 4 442
陌清茗
陌清茗 2021-02-01 21:19

I have an UIWebView in one tab that loads in viewDidLoad, but if user taps other tab the loading will be disrupted and - (void)webView:(UIWebView *)webView didFailLoad

4条回答
  •  南旧
    南旧 (楼主)
    2021-02-01 21:43

    For pages with multiple frames, UIWebView.loading property should also be used.

    Apple's doc: @property(nonatomic, readonly, getter=isLoading) BOOL loading A Boolean value indicating whether the receiver is done loading content.

    If YES, the receiver is still loading content; otherwise, NO.

    In iOS6 (beta 4) it looks like Apple has fixed some issues with this property as well. http://code-gotcha.blogspot.fi/2012/08/uiwebviewloading-in-ios-6-fixed.html

提交回复
热议问题