我正在尝试按修改日期对搜索结果进行排序。 如果我想按 creationDate 来做:
query.sortDescriptors = [NSSortDescriptor(key: "creationDate", ascending: false)]
修改日期的关键是什么? 所有 NSSortDescriptor 键的列表或找到它们的方法将非常有帮助。
最佳答案
随机尝试 100 次后偶然发现它。 这是:
query.sortDescriptors = [NSSortDescriptor(key: "modificationDate", ascending: false)]
他们的关键是“modificationDate” 我仍然可以使用这些信息的列表来了解如何找到它们。 -谢谢
关于ios - 如何按修改日期对 CloudKit 结果进行排序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31800553/