Using a distance filter
suggest changedistanceFilter 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:.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents