Defining Boundaries

Core Location’s location manager (CLLocationManager) keeps a set of regions being monitored for an app. In ICFMainViewController, the updateMapAnnotations: method clears out the set of monitored regions when a change has been made.

CLLocationManager *locManager =[[ICFLocationManager sharedLocationManager] locationManager];NSSet *monitoredRegions = [locManager monitoredRegions];for (CLRegion *region in monitoredRegions){    [locManager stopMonitoringForRegion:region];}

Next, the method iterates over the user’s list of favorite places to determine which places the user has set to geofence. For each place that the user has set to geofence, the method will add the overlay view as described in the ...

Get iOS Components and Frameworks: Understanding the Advanced Features of the iOS SDK now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.