开发者

navcontroller refresh webview

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?


In the first view controller:

- (void)viewWillAppear:(BOOL)animated {
    [myWebView reload];
    [super viewWillAppear:animated];
}


In the view controller for the WebView do the following:

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear: animated];

    [webView reload];
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜