mirror of
https://github.com/purplecabbage/phonegap-plugins.git
synced 2026-04-24 03:00:11 -04:00
Display a message when navigation failed
- alert is shown with error description - address panel text changed - spinner stopped
This commit is contained in:
@@ -219,5 +219,21 @@
|
||||
|
||||
}
|
||||
|
||||
- (void)webView:(UIWebView *)wv didFailLoadWithError:(NSError *)error {
|
||||
NSLog (@"webView:didFailLoadWithError");
|
||||
[spinner stopAnimating];
|
||||
addressLabel.text = @"Failed";
|
||||
if (error != NULL) {
|
||||
UIAlertView *errorAlert = [[UIAlertView alloc]
|
||||
initWithTitle: [error localizedDescription]
|
||||
message: [error localizedFailureReason]
|
||||
delegate:nil
|
||||
cancelButtonTitle:@"OK"
|
||||
otherButtonTitles:nil];
|
||||
[errorAlert show];
|
||||
[errorAlert release];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user