I am trying to set the coordinate of the display center as the location of users:
[self.mapView setCenterCoordinate:[[[self mapView] userLocation] coordinate]];
However, I get a crash related to the user's wrong location:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Invalid Coordinate -180.00000000, -180.00000000'
Has anyone else had this error before? Or do you know how to fix it?
Thanks for the advanced.
XcodeDev.
source
share