Created
August 1, 2012 16:24
-
-
Save versluis/3228441 to your computer and use it in GitHub Desktop.
How to handle an error while loading a UIWebView
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error { | |
[self.spinningWheel stopAnimating]; | |
UIApplication *application = [UIApplication sharedApplication]; | |
application.networkActivityIndicatorVisible = NO; | |
UIAlertView *infoMessage; | |
infoMessage = [[UIAlertView alloc] | |
initWithTitle:@"The internet is broken" message:@"Looks like there's a problem with your internet connection. Please check and try again later." | |
delegate:self cancelButtonTitle:@"Bloody technology!" otherButtonTitles:nil]; | |
infoMessage.alertViewStyle = UIAlertViewStyleDefault; | |
[infoMessage show]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment