I have a UIWebView just on a View and when I cliked in a link, I launch this view with a good content.
NSLog(@"---> %@",url);
NSURL *websiteUrlL = [NSURL URLWithString:url];
NSURLRequest *urlRequestT = [NSURLRequest requestWithURL:websiteUrlL];
NSLog(@"---> %@",urlRequestT);
In my Output I have
- url : is good with http:// URL .php
- urlRequestT : is good with : { URL: http:// URL .php }
(void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error { NSLog(@"Error %li", (long)error.code); if (error.code == NSURLErrorCancelled) return; // this is Error -999 NSLog(@"Canceled request: %@", [webView.request.URL absoluteString]); }
In my Output Error I have the number -999
I don't know why my page doesn't load with this type of file... My UiWebView works fine with a simple html file Thanks for advance.
I finished to find the good answer, the better place for load content in UIWebView is in viewDidAppear not in viewDidLoad