tags:

views:

155

answers:

1

i am trying to calculate the distance between the statringpoint which hold the initial value of location and the newlocation using the following code but i am getting null in distance. can anyone help me out with this

CLLocationDistance distance = [newLocation getDistanceFrom:startingPoint];
A: 

Your code should work. Maybe startingPoint is nil?

Philippe Leybaert