locationManager(_:didExitRegion:)
Tells the delegate that the user left the specified region.
Declaration
optional func locationManager(_ manager: CLLocationManager, didExitRegion region: CLRegion)Parameters
- manager:
The location manager object reporting the event.
- region:
An object containing information about the region that was exited.
Mentioned in
Discussion
Because regions are a shared application resource, every active location manager object delivers this message to its associated delegate. It doesn’t matter which location manager actually registered the specified region. If multiple location managers share a delegate object, that delegate receives the message multiple times.
The region object provided may not be the same one that was registered. As a result, you should never perform pointer-level comparisons to determine equality. Instead, use the region’s identifier string to determine if your delegate should respond.