I am seeing this behavior not documented in Apple's UIWebViewDelegate:
If I return NO to the delegate function
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType {
This function is immediately called with the error 101 (This URL cannot be loaded.).
- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error {
Since I explicitly cancelled the request, is it even normal for didFailLoadWithError to be invoked?
Update: UIWebView will NOT call didFailLoadWithError if you manually cancel the connection.
I've verified this with testing. The reason why didFailLoadWithError is for something else completely unrelated to UIWebView.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With