Created
October 22, 2013 10:47
-
-
Save ZackMcBride/7098518 to your computer and use it in GitHub Desktop.
I recently had a problem using the CLRegion functionality where if the app was launched while within a Geofence, the didEnterRegion delegate method didn't get called. I created this little method to check for that.
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
- (BOOL)insideRegion:(CLRegion *)region location:(CLLocationManager *)manager { | |
if([region containsCoordinate:manager.location.coordinate]){ | |
return true; | |
} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment