且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

CoreLocation的两个坐标之间的距离

更新时间:2022-12-09 13:13:40

返回从接收器坐标到指定位置坐标的距离(以米为单位)。

Returns the distance (in meters) from the receiver’s coordinate to the coordinate of the specified location.

// Deprecated in iOS 3.2 method
- (CLLocationDistance)getDistanceFrom:(const CLLocation *)location

// Correct method
- (CLLocationDistance)distanceFromLocation:(const CLLocation *)location

CLLocation