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?
+1
A:
In the view controller for the WebView do the following:
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear: animated];
[webView reload];
}
Max Seelemann
2010-08-08 20:08:36
how can I skip [webView reload] the first time opening the app?
Yazzmi
2010-08-08 21:10:01
The animated flag should be NO then...
Max Seelemann
2010-08-09 14:58:45
+1
A:
In the first view controller:
- (void)viewWillAppear:(BOOL)animated {
[myWebView reload];
[super viewWillAppear:animated];
}
jtbandes
2010-08-08 20:09:32