Converting CLLocationCoordinates2D into an NSValue

后端 未结 4 743
佛祖请我去吃肉
佛祖请我去吃肉 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:46

    Hi you can convert the CLLocationCoordinates2D into an NSValue by doing like below but have you check the coordinate contains any value or not once.

    NSValue *value = [NSValue valueWithMKCoordinate:coordinate];
    

    Thanks

提交回复
热议问题