Search code examples
iosiphonegeolocationcore-locationcompass-geolocation

iOS How to know I'm crossing a particular location


I'm using Core Location with ios 6. I have been searching for this but could find an appropriate solution

My question is: - How can I know if I am crossing point X in any direction ?


Solution

  • Did you tried to use distanceFromLocation method from CLLocation? Like:

     CLLocationDistance distance = [targetLocation distanceFromLocation:currLocation];
    

    And in background you check the distance to see if the user is close enough to your point.