【发布时间】:2017-02-28 03:51:43
【问题描述】:
我想知道是否可以在 CloudKit 中形成一个 NSPredicate 来执行以下操作:
假设我有一些记录类型 A。假设 A 有一些属性 b,其类型为 [CKReference]。让 c 为 CKReference 类型的某个元素,它可能在 b 中。
我希望查询列表 b 中有 c 的所有 A 类型的记录。 NSPredicate可以做到这一点吗?
提前致谢!
编辑
我基本上想这样做 (CloudKit - NSPredicate for finding all records that contain specified CKReference in a reference list),但在 Swift 3 中。我在网上找不到好的资源来解释如何在 NSPredicate 中使用 contains。
【问题讨论】:
标签: ios swift nspredicate cloudkit