简体   繁体   English

如何将NSValue转换为CLLocationCoordinate2D

[英]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.

相关问题 如何将NSMutableArray转换为CLLocationCoordinate2D - How to convert NSMutableArray to CLLocationCoordinate2D 转换UnsafeMutablePointer <CLLocationCoordinate2D> 到Swift中的[CLLocationCoordinate2D] - Convert UnsafeMutablePointer<CLLocationCoordinate2D> to [CLLocationCoordinate2D] in Swift 无法将CLLocationCoordinate2D转换为(CLLocationCoordinate2D) - Cannot convert CLLocationCoordinate2D to (CLLocationCoordinate2D) MKPolygon - 如何确定 CLLocationCoordinate2D 是否在 CLLocationCoordinate2D 多边形中? - MKPolygon - How to determine if a CLLocationCoordinate2D is in a CLLocationCoordinate2D polygon? 如何存储CLLocationCoordinate2D? - How to store CLLocationCoordinate2D? Swift:如何将 CGPoint 转换为 CLLocationCoordinate2D - Swift: How do you convert CGPoint to CLLocationCoordinate2D 将 CLLocationCoordinate2D(s) 的字符串转换为数组 - Convert String of CLLocationCoordinate2D(s) into array 将CLLocation或CLLocationCoordinate2D转换为CGPoint - Convert CLLocation or CLLocationCoordinate2D to CGPoint 如何获得CLLocationCoordinate2D的GMSPlace? - How to get GMSPlace for a CLLocationCoordinate2D? ios:如何使用获取CLLocationCoordinate2D <CLLocationManagerDelegate> - ios: How to obtain CLLocationCoordinate2D with <CLLocationManagerDelegate>
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM