Clear UIWebView content upon dismissal of modal view (iPhone OS 3.0)

后端 未结 6 731
醉梦人生
醉梦人生 2020-12-08 11:12

I currently have a UIWebView that is displayed within a modal view. It is basically a detail view that provides a view of a page when the user clicks a link. When the view

6条回答
  •  旧巷少年郎
    2020-12-08 11:23

    Releasing the web view is probably the best approach. If a view is in a view hierarchy (has a superview) you must call removeFromSuperview to get the superview to release the view.

    You could also load an html string for an empty document:

    [webView loadHTMLString:@"" baseURL:nil];
    

提交回复
热议问题