在 UIWebView didFailWithError 下,我创建了一个 UIButton 并将其添加到视图中:
UIButton *refreshButton = [UIButton buttonWithType:UIButtonTypeCustom];
...
....
[self.imageView addSubview:refreshButton];
单击按钮时,我请求 webView 重新加载给定的 URL。
这个方法完成后 UIButton 会发生什么didFailWithError
,它会自动释放。
如果在重新加载后再次捕获了 didFailWithError ,那么我是否可以正确地说 UIButton 必须从头开始重新创建。
另外,我将如何从 webViewDidFinishLoad 中的视图中删除 UIButton
[refreshButton removefromsuperview]
谢谢