Is there any way to know if all of the content of the UIWebView
is loaded?
I'm loading the content as follows:
if let url = NSURL(string: currentArticle.articleURL) {
webView.loadRequest(NSURLRequest(URL: url))
}
webView.footerView = footerForWebView
I already see this question:
UIWebView: when did a page really finish loading?
But the answer is not correct, I try this:
- (void)webViewDidFinishLoad:(UIWebView *)webView {
if ([[webView stringByEvaluatingJavaScriptFromString:@"document.readyState"] isEqualToString:@"complete"]) {
NSLog(@"FINISH")
}
}
But is printing FINISH more than one time.