Created
May 26, 2015 21:48
-
-
Save gmertk/4d51bcf79f226419dc8c to your computer and use it in GitHub Desktop.
Move ranging into didDetermineSate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func locationManager(manager: CLLocationManager!, didDetermineState state: CLRegionState, forRegion region: CLRegion!) { | |
if let region = region as? CLBeaconRegion { | |
switch state { | |
case .Inside: | |
manager.startRangingBeaconsInRegion(region) | |
case .Outside: | |
manager.stopRangingBeaconsInRegion(region) | |
case .Unknown: | |
break | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment