I need to check if a webview when completed loading has any content or not.
What I require is simple. Its a small webview strip at the bottom of my pages (like an advert
Just replying to an old post, but maybe new arrivals will find it useful. I struggled with the same problem and found this solution to work in my case:
if (webView.request.URL.absoluteURL == nil) {
NSLog(@"nil webby");
NSLog(@"url: %@", webView.request.URL.absoluteURL);
// Perform some task when the url is nil
} else {
NSLog(@"loaded webby");
NSLog(@"url: %@", webView.request.URL.absoluteURL);
// Perform some task when the url is loaded
}
You can call it from the webViewDidFinishLoad: method.