iphone - mapViewDidFailLoadingMap delegate method gets called with error == 0 -
In my view controller, I create an MKMapView object. I set myself a delegate, and in ViewController, I implemented:
- (zero) mapViewDidFailLoadingMap: (MKMapView *) mapView withError: (NSError *) error
This method is called, but in Debugger, I think the value in error
is 0x0
It is on the device, and in the simulator.
I need an error code because I want to give a message for the case where Internet access is unavailable, while ignoring cases (from the API doctor) "if an additional map for tile The request comes when the last request of the tile is still pending "(which does not seem like a failure)
< P> I did some tests
- Internet is off: [error description] = error Domain = NSURLErrorDomain code = -1009 User Interface = 0x46c6120 "No Internet Connection"
- Scroll around very quickly: Error = zero (0x0)
I know There is no other error situation, but at least you can discriminate between an Internet connection error (in which I will show a warning) and scrolling the case very quickly, in which I will ignore it.
Comments
Post a Comment