I have a map view in my application which - among other things - displays the location of the user. Therefore my application will show the location arrow on the status bar but when I go to another view of the application the arrow does not disappear.
Therefore it seems that the application is still location the user - which should not be the case as the user is no longer on the view. Could I have forgot to "release" the user's location and if so, how will I do that?
//
// SET MAPVIEW
//
MKCoordinateRegion region = { {0.0, 0.0 }, { 0.0, 0.0 } };
region.center.latitude = 56.989808;
region.center.longitude = 9.656177;
region.span.longitudeDelta = 0.007f;
region.span.latitudeDelta = 0.003f;
[mapView setShows开发者_如何学CUserLocation:TRUE];
[mapView setMapType:MKMapTypeHybrid];
[mapView setRegion:region animated:FALSE];
When you done with your location work then call -
[locationManager stopUpdatingLocation];
here locationManager is the instance of CLLocationManager.
精彩评论