Reputation: 1571
I have two views controlled by a uinavigationcontroller. the first view has a UIWebView and has button that takes the user to the second view. The user can get back to the first view by tapping the back button on the nav bar. however the webview's content is not current. How can I refresh the content in the first view's webview when coming back from the second view?
Upvotes: 1
Views: 1093
Reputation: 118651
In the first view controller:
- (void)viewWillAppear:(BOOL)animated {
[myWebView reload];
[super viewWillAppear:animated];
}
Upvotes: 2
Reputation: 9364
In the view controller for the WebView do the following:
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear: animated];
[webView reload];
}
Upvotes: 1