簡體   English   中英

如何將NSValue轉換為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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM