I’ve been working on a new iOS project that uses CoreLocation to determine some points. While CLLocation has a method for determining the distance between two locations (
distanceFromLocation:) it doesn’t have one for doing the opposite: calculating a second location based on a distance (and bearing) from the first.
So I added a category on CLLocation that performs this calculation:
1 2 3 4 5 6
The other need I had was to calculate the bearing between two points:
1 2 3 4 5 6 7
My Objective-C category incorporating these calculations is available from my Github account.