Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

DDolan

macrumors newbie
Original poster
Jul 12, 2010
10
0
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:


Code:
-(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];
    
}
 
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.
 
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.