getDistanceFrom 대신에 distanceFromLocation  를 사용하시면 됩니다. 

Deprecated 라고 나오는 메소드들은 현재는 지원하지만 추후에
언제든지 제거될 수 있는 메소드들입니다. 경고라고 무시하고 넘어가시지
마시고 대체 할수 있는 메소드가 존재하니 새로운 메소드로 변경해서
사용하시면 됩니다.


getDistanceFrom:

Returns the distance (in meters) from the receiver’s location to the specified location. (Deprecated in iOS 3.2. Use the distanceFromLocation: method instead.)

- (CLLocationDistance)getDistanceFrom:(const CLLocation *)location
Parameters
location

The other location.

Return Value

The distance (in meters) between the two locations.

Discussion

This method measures the distance between the two locations by tracing a line between them that follows the curvature of the Earth. The resulting arc is a smooth curve and does not take into account specific altitude changes between the two locations.

Availability
  • Available in iOS 2.0 and later.
  • Deprecated in iOS 3.2.
Declared In
CLLocation.h



Posted by great-artist
,