首先,url不可达,webview调用loadRequest时,出现两条错误信息,UIWebViewDelegate
didFailLoadWithError
调用不上。
NSURLConnection finished with error - code -1001
HTTP load failed (error code: -999 [1:89])
NSURLRequest *request =[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://ip:port/index"] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:5];
[self.webView loadRequest:request];
最佳答案
我没有设置 webView.delegate,所以委托(delegate)没有被调用
关于ios - NSURLConnection 完成错误 - 1001,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50072160/