![](/img/trans.png)
[英]How to convert NSMutableArray to CLLocationCoordinate2D
[英]How to Convert NSValue to CLLocationCoordinate2D
如何將NSValue
轉換為CLLocationCoordinate2D
?
我在(NSArray *)coordinateArray
收到NSValue
,並且需要為數組中的每個NSValue
獲取CLLocationCoordinate2D
。
OBJ-C
#import <MapKit/MKGeometry.h>
NSValue *coordinateValue;
CLLocationCoordinate2D coordinate = [coordinateValue MKCoordinateValue];
斯威夫特4.x
let coordinateValue: NSValue = NSValue.init()
let coordinate: CLLocationCoordinate2D = coordinateValue.mkCoordinateValue
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.