【发布时间】:2012-10-24 15:30:35
【问题描述】:
在 UIWebView didFailWithError 下,我创建了一个 UIButton 并将其添加到视图中:
UIButton *refreshButton = [UIButton buttonWithType:UIButtonTypeCustom];
...
....
[self.imageView addSubview:refreshButton];
当按钮被点击时,我请求 webView 重新加载给定的 URL。
didFailWithError 方法完成后 UIButton 会发生什么,它会自动释放吗?
如果在重新加载后再次捕获了 didFailWithError,那么我是否应该说 UIButton 必须从头开始重新创建。
另外,我将如何从 webViewDidFinishLoad 中的视图中删除 UIButton
[refreshButton removefromsuperview]
谢谢
【问题讨论】:
标签: objective-c uiwebview uibutton