如何编写NSPredicate以从数组中获取不等于ID的所有值
这是我试图这样做的方式:
var mediaArr: [String] = ["1002971147784767054_3158228926", "1002971147784767054_3158228976", "1002971147784767054_3158228986"]
let query = CKQuery(recordType: "Orders", predicate: NSPredicate(format: "mediaId != %@", self.mediaArr))
答案 0 :(得分:2)
解决了
let query = CKQuery(recordType: "Orders", predicate: NSPredicate(format: "NOT (mediaId IN %@)", self.mediaArr))