开发者

How to closw webView?

I am designing a webView with a close 开发者_Python百科button. When the application is launched, it opens the given url. When the button is touched, i want to close the webView.

I need some button event which closes the webView. Thank you for your answers.


UIWebView inherits from UIView. So the answer is: It depends!

If you're using a UINavigationController and used

[[self navigationController] pushViewController:newUIWebController];  

you can close your UIView by using

[self.navigationController popViewControllerAnimated:YES]; 

If you're using some other method to display your view (like addSubView) you can utilize the corresponding method like removeFromSuperview.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜