ios - 如何按修改日期对 CloudKit 结果进行排序?

标签 ios swift sorting cloudkit

我正在尝试按修改日期对搜索结果进行排序。 如果我想按 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/

相关文章:

swift - 如何正确使用 teodorpatras/SideMenuController?

ios - 调用协议(protocol)的 mutating 函数生成 "has no member ' functionName'"错误

java - 对自定义类 arraybuffer 进行排序并获取 scala 中的子集

php - Magento 按十进制而不是字母数字排序属性

ios - 我在新的xcode更新中有简单的Firebase代码错误

ios - UIPageController 与 UIPageControl 一起使用?

ios - 制作 VLCMediaPlayer (MobileVLCKit) 的快照

ios - Textfield 中的文本从 TextField IOS 的中间开始

ios - swift 中的 NSPredicate 'IN' 运算符格式化问题。无法解析格式字符串

python - python中按行对数组进行排序