I already googled but didn't find a clear answer. When is "didFailLoadWithError" called? I want to use it to show an alert when there's no internet connection. Is that the right way?
It's for my iOS app made with Xcode and Swift.
didFailLoadWithError
method will get called in the following conditions:
So the best solution to check network is to use apple Reachability
code.
Update:
The best solution to check for Internet connection (Wi-Fi and cellular) is: [Reachability Swift 2
][2]