i have a tab bar control. 1st tab contains a navigation control. On the 2nd tab i want to load a web page (say google.com). I have written the code as
NPIViewController.h
@interface NPIViewController : UIViewController {
IBOutlet UIWebView *webView;
}
@property (nonatomic,retain) IBOutlet UIWebView *webView;
@end
NPIViewController.m
- (void)viewDidLoad {
[super viewDidLoad];
NSURL *url = [NSURL URLWithString:@"http://www.google.com"];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[webView setScalesPageToFit:YES];
[self.webView loadRequest:request];
}
The page just does not load. No compilation or runtime errors. What is wrong in this ?