HighFlyingFantasy
HighFlyingFantasy

Reputation: 3789

CLLocationManager best practices

I'm using a CLLocationManager (_locationManager) to track user location within my tab application to enable tracking movement in the background. There is a record button, which when pressed, begins tracking and drawing a polyline of the user's movements. The [_locationManager startUpdatingLocation] is called in viewDidLoad of the MapViewController within my UITabBarController. Is it best practice to tell the _locationManager to stop updating the location when the user switches to another tab (If the application is not recording)? Or should I let it keep going? The reason I ask is because i use kCLLocationAccuracyBestForNavigation if enabled in the settings, and I know there are battery concerns if left to run.

Upvotes: 0

Views: 628

Answers (1)

sosborn
sosborn

Reputation: 14694

There is one basic rule: if you need the data, then keep it on, else, turn it off.

Upvotes: 2

Related Questions