Give this a shot
@interface DisplayWebViewController : UIViewController <UIWebViewDelegate>
@property(nonatomic, weak) IBOutlet UIWebView *displayWebView;
@end
@implementation DisplayWebViewController {
}
- (void)viewDidLoad {
[super viewDidLoad];
// Perform setup after loading the view.
self.displayWebView.delegate = self;
NSLog(@"%@", self.webContent.url);
NSURL *webURL = [NSURL URLWithString:@"http://example.com"];
NSURLRequest *request = [NSURLRequest requestWithURL:webURL];
[self.displayWebView loadRequest:request];
}
- (void)webViewDidFinishLoad:(UIWebView *)webView {
if ([[webView stringByEvaluatingJavaScriptFromString:@"document.readyState"] isEqualToString:@"complete"]) {
// The UIWebView has finished loading.
NSLog(@"Document ready");
}
}
@end