ios-获取url connection error

1
2
3
4
5
6
7
8
- (void)webView:(WKWebView *)webView didFailProvisionalNavigation:(WKNavigation *)navigation withError:(NSError *)error{
NSLog(@"connection didFailWithError");

if(error.code==-1009){
do something...

}
}