UIWebView: when did a page really finish loading?

后端 未结 11 1199
轮回少年
轮回少年 2020-11-29 00:09

I need to know, when a web page has completely been loaded by UIWebView. I mean, really completely, when all redirects are done and dynamically loaded content is ready. I tr

11条回答
  •  渐次进展
    2020-11-29 00:35

    Thanks to JavaScript, new resources and new graphics can be loading forever-- determining when loading is "done", for a page of sufficient perversity, would amount to having a solution to the halting problem. You really can't know when the page is loaded.

    If you can, just display the page, or an image of it, and use webViewDidLoad to update the image, and let the user descide when to cut things off-- or not.

提交回复
热议问题