[英]How to Convert NSValue to CLLocationCoordinate2D
How to convert NSValue
to CLLocationCoordinate2D
? 如何将
NSValue
转换为CLLocationCoordinate2D
?
I receive NSValue
in (NSArray *)coordinateArray
and need to get CLLocationCoordinate2D
for each NSValue
in array. 我在
(NSArray *)coordinateArray
收到NSValue
,并且需要为数组中的每个NSValue
获取CLLocationCoordinate2D
。
Obj-C OBJ-C
#import <MapKit/MKGeometry.h>
NSValue *coordinateValue;
CLLocationCoordinate2D coordinate = [coordinateValue MKCoordinateValue];
Swift 4.x 斯威夫特4.x
let coordinateValue: NSValue = NSValue.init()
let coordinate: CLLocationCoordinate2D = coordinateValue.mkCoordinateValue
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.