webView not loading content

Discussion in 'iOS Programming' started by DDolan, Aug 12, 2011.

  1. DDolan macrumors newbie

    Jul 12, 2010
    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];
  2. ppilone macrumors 6502

    Jan 20, 2008
    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.
  3. DDolan thread starter macrumors newbie

    Jul 12, 2010
    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.

Share This Page