View Full Version : webView not loading content

Aug 12, 2011, 05:58 AM
I'm trying to create a simple app that needs webView to load an external website. The build seems to run find and no errors are returned but webView doesn't load the site - just a blank page.

Anyone know what the issue is?

This is the part of the AppnameViewController.h file with the site to load info:

-(void)viewDidLoad {

[super viewDidLoad];
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://bbc.co.uk"]]];
[NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(checkLoad) userInfo:nil repeats:YES];
[NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(checkNotLoad) userInfo:nil repeats:YES];


Aug 12, 2011, 09:49 AM
Did you use Interface Builder to design your AppnameViewController? If so, are you sure you've properly hooked up your UIWebView to your webView outlet in AppnameViewController?

Also, UIWebViewDelegate has some handy methods for debugging the load state of the UIWebView. Make sure your AppnameViewController conforms to the UIWebViewDelegate protocol and use those methods to find out if your UIWebView is doing what you expect it to be doing.

Aug 15, 2011, 03:19 AM
I have no idea. I followed a few tutorials to check and as far as I can see I've done everything that needs doing.