I am testing a UIWebview with several types of documents --.xlsx, .jpg, etc. - and he opens most of them just fine. From time to time, I open a local file, and this message appears directly in the web view:
Unable to Read Document
An error occurred while reading the document
I'm not interested in why, this error occurs, for example, when I feed a UIWebView garbage file (intentionally). The problem is that I cannot figure out how to determine when this happens. It does not fire webView: didFailLoadWithError , it does not raise NSException (via @try and @catch >), and when I check the document in webViewDidFinishLoad , webView.request.HTTPBody is null.
Does anyone know how to determine when a UIWebView cannot display content?
source
share