查询NSPredicate
let predicate2 = NSPredicate(format: "metadata.%K != YES", HKMetadataKeyWasUserEntered)
- 还有其他NSPredicate
let compoundPredicate = NSCompoundPredicate(type: .and, subpredicates: [predicate1, predicate2])
let predicate2 = NSPredicate(format: "metadata.%K != YES", HKMetadataKeyWasUserEntered)
let compoundPredicate = NSCompoundPredicate(type: .and, subpredicates: [predicate1, predicate2])