2009-07-16 76 views
0

我試圖計算使用下面的代碼保存位置初始值和newlocation的statringpoint之間的距離,但我得到的距離爲null。誰能幫我這個得到iphone上的兩個位置之間的距離

CLLocationDistance distance = [newLocation getDistanceFrom:startingPoint]; 
+0

是newLocation和startingPoint兩者的類型:CLLocation *? – 2009-08-03 11:20:04

回答

0

你的代碼應該工作。也許起點