Iam getting this error while using UIWebView. Intially the web page gets loaded, after sometime I get this error. My code snippet
- (id)openSite:(NSString *)urlAsString {
NSURL *urll = [NSURL URLWithString:urlString];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:urll];
[showWebView loadRequest:requestObj];
return self;
}
- (void)webViewDidStartLoad:(UIWebView *)webView {
[activityIndicatorView startAnimating];
}
- (void)webViewDidFinishLoad:(UIWebView *)webView {
[activityIndicatorView stopAnimating];
}
- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error
{
[activityIndicatorView stopAnimating];
NSString* errorString = [NSString stringWithFormat:@"<html><center><font size=2 color='black'>An error occurred:<br>%@</font></center></html>", error.localizedDescription];
[self.showWebView loadHTMLString:errorString baseURL:nil];
}
What am I doing wrong?