distanceInMeters Problems with arrays and sort

后端 未结 3 1836
野性不改
野性不改 2020-12-04 03:54

I want to sort my TableView by distance, but I have mixed up:( Please help me if You can, I would appreciate it, really :(

I have an array with 100 objects.

3条回答
  •  悲哀的现实
    2020-12-04 04:43

    You have to choose the index of your array:

    let mallLocate = CLLocation(latitude: malls[0].latitude, longitude: malls[0].longitude)
    

提交回复
热议问题