How to convert NSValue
to CLLocationCoordinate2D
?
I receive NSValue
in (NSArray *)coordinateArray
and need to get CLLocationCoordinate2D
for each NSValue
in array.
Obj-C
#import <MapKit/MKGeometry.h>
NSValue *coordinateValue;
CLLocationCoordinate2D coordinate = [coordinateValue MKCoordinateValue];
Swift 4.x
let coordinateValue: NSValue = NSValue.init()
let coordinate: CLLocationCoordinate2D = coordinateValue.mkCoordinateValue