Using a distance filter

suggest change

distanceFilter is a distance in meters. The view controller must adopt CLLocationManagerDelegate, and location permission must already have been granted. Call startUpdatingLocation or no updates are delivered.

CLLocationManager *locationManager = [[CLLocationManager alloc] init];
locationManager.delegate = self;
locationManager.desiredAccuracy = kCLLocationAccuracyBest;
locationManager.distanceFilter = 5;
[locationManager startUpdatingLocation];

Location changes of less than 5 meters are not delivered to locationManager:didUpdateLocations:.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents