I have a 2 tab application. One of those tabs loads the Map View, and it points to a few coordinates (Annotation pin points). All of this works properly.
But when i keep on clicking the first tab and second continuously i get the following error
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Invalid Coordinate -180.00000000, -180.00000000'
I don’t have a coordinate like that, but this only comes when i keep on clicking the tabs continuously. How can i solve this problem ?
I had the same problem when switching tabs in my app. I fixed the problem by validating the coordinate before assigning it to MKMapView. I did the validation with the following snippet: