2
複雑なNSCompoundPredicateを迅速に作成したいが、これを行う方法がわからない。複雑なNSCompoundPredicateを迅速に作成する3
5つの述語(p1、p2、p3、p4、p5)があるとします。私は条件の下に実装したい:
compound1 = (p1 AND p2 AND p3) // NSCompoundPredicate(type: .and,
//subpredicates: predicates)
compound2 = (p4 AND p5) // NSCompoundPredicate(type: .and,
//subpredicates: predicates)
compound3 = (compound1 OR compound2) // problem is here
fetchRequest.predicate = compound3
NSCompoundPredicateそれは2番目の引数が、それは望んでいないことをNSPredicatesの配列を取得しますよう。最高の解決策は何ですか? NSPredicate
から