I've got a navigation controller based app that downloads an RSS feed and lays out the item titles in a TableView. That part works. When I click on an article title, I want to push an instance of my FeedArticleController onto the navigation stack. The FeedArticleController loadView method sets up the views (since I want to learn how to do this programmatically instead of using IB). Here's the loadView:
- (void)loadView {
UIView *view = [[UIView alloc] init];
self.view = view;
webView = [[UIWebView alloc] initWithFrame:self.view.bounds];
webView.delegate = self;
[view addSubview:webView];
}
Does that make sense? Now, to make the webView actually load the page, I have this viewDiDLoad method:
- (void)viewDidLoad {
[super viewDidLoad];
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.google.com"]]];
}
And then I have the delegate methods, webViewDidStartLoad and webViewDidFinishLoad. They just print to NSLog.
Am I missing something in how I constructed and added the views? The delegate methods seem to be printing to the log after a delay and there is traffic on the line when the webView is instantiated. So, I think it is loading the page, but not being displayed?
Thanks guys.