I read that reusing UIWebViews is bad practice. Some of the code I inherited at work pushes a variety of content to UIWebView. Powerpoints, Word documents and videos. All of this works fine under normal circumstances. When we switch content too quickly in UIWebView, it is unloaded.
My webView is set as a property. It is connected to IB just fine. The usual selection from our tableView loads local content just fine. It requires quick selection of the fire of one or the same cell or several combinations to make it fail.
I can write some error messages for webViewDidFailWithError. But this will happen even without a crash. Here is a localized error string.
The operation couldn't be completed. (NSURLErrorDomain error -999.)
When the application finally crashes, it explodes on this stupid WebCore error.
If anyone has any links or code examples on how to handle this, I would appreciate it. Perhaps an example of how best to use my webView property without blowing things in.
I would download part of my code, but a lot is not happening in relation to the webView itself. All content passed to the webView is executed using [self.webView loadRequest:request];
with the request being NSURLRequest filled out with the local content path.
I will be very grateful if anyone can help me with this. Fingers crossed for something simple.
source share