【发布时间】:2016-02-25 20:46:17
【问题描述】:
let points:[Int] = [200, 1000, 100, 500]
let people:[String] = ["Harry", "Jerry", "Hannah", "John"]
let peopleIds:[Int] = [1, 2, 3, 4]
let sex:[String] = ["Male", "Male", "Female", "Male"]
如何按点对这些数组进行排序?:
let points:[Int] = [1000, 500, 200, 100]
let people:[String] = ["Jerry", "John", "Harry", "Hannah"]
let peopleIds:[Int] = [2, 4, 1, 3]
let sex:[String] = ["Male", "Male", "Male", "Female"]
它不是 How to sort 1 array in Swift / Xcode and reorder multiple other arrays by the same keys changes 的重复项 我已经尝试了答案,但它不起作用
【问题讨论】:
标签: arrays sorting swift2 sorted