Converting CLLocationCoordinates2D into an NSValue

后端 未结 4 798
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-22 07:31

I\'m simply trying to convert CLLocationCoordinates into an NSValue to be used in an array brought back later in my app. Here is my code:



        
4条回答
  •  自闭症患者
    2021-01-22 07:39

    Try:

    NSValue *locationValue = [NSValue valueWithBytes:&coordinates[i] objCType:@encode(CLLocationCoordinate2D)];
    

提交回复
热议问题