I am using WKWebView
for iOS 8 devices and want to check if the error occuring is NSURLErrorDomain
then I want to make some changes, until now, I have added below code, but somehow the compiler goes into else part, now sure why.
- (void)webView:(WKWebView *)webView didFailNavigation:(WKNavigation *)navigation withError:(NSError *)error
{
if ( [error domain] == NSURLErrorDomain )
{
//code here
}
else
{
//But compiler always comes here
}
}
The error I do get is 'NSURLErrorDomain', but compiler is not executing if loop and goes in else part. Can anyone tell me why it is?