该数组包含实体实例(Core Data 的图形库):
let timCook = Entity(type: "Employees")
timCook["name"] = "Tim Cook"
timCook["company"] = "Apple"
上面的代码不起作用,我认为 && 不是按多个值排序的正确方法......
self.storage.sortInPlace ({ ($0["company"] as? String) < ($1["company"] as? String)
&& ($0["name"] as? String) < ($1["name"] as? String)
})
谢谢