I\'m trying to zoom a map into the user\'s current location once the view loads, but I\'m getting the error \"** * Terminating app due to uncaught exception \'NSInvalidA
As with Deepak's answer, except you could set the span more elegantly:
- (void)mapView:(MKMapView *)mapView didUpdateUserLocation:(MKUserLocation *)userLocation {
MKCoordinateRegion mapRegion;
mapRegion.center = map.userLocation.coordinate;
mapRegion.span = MKCoordinateSpanMake(0.2, 0.2);
[map setRegion:mapRegion animated: YES];
}