按最接近用户位置的顺序对CLLocationCoordinate2D数组进行排序

时间:2018-08-21 08:49:39

标签: arrays swift sorting cllocationmanager

我有一个名为CLLocationCoordinate2D的对象数组,

locationArray

我一直在尝试根据位置最接近用户的方式对该数组进行排序。在将数据分配给阵列后打印阵列时,它将以我认为是正确的格式进行打印:

[__C.CLLocationCoordinate2D(latitude: 55.9.49653, longitude: -3.191079), .....]

无论如何,如果有人可以帮助我对坐标最接近用户的数组进行排序,我将不胜感激。

谢谢。

0 个答案:

没有答案