I have what is quite a simple app at the moment that i am trying to get to load a url in a UIwebView. However all I get is a blank page and from what I can tell its just not trying to load the url at all.
I have posted the code i added from my .h and .m files below to let you guys see what is going on. It does actually load the web view just not the url.
Hope I have explained this ok.
Thanks
The .h file
@interface StaffsAirsoftAppViewController : UIViewController {
IBOutlet UIWebView *webView;
IBOutlet UIActivityIndicatorView *active;
}
The .m file
-(void)viewDidLoad {
[super viewDidLoad];
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.google.com"]]];
[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];
}
-(void)checkLoad {
if(webView.loading) {
[active startAnimating];
}
}
-(void)checkNotLoad {
if(!(webView.loading)) {
[active stopAnimating];
}