我有以下搜索NSPredicate
NSPredicate *searchPredicateTextComponent = [NSPredicate predicateWithFormat:@"(SUBQUERY(entities, $x , ((ANY $x.objects.type LIKE 'text') AND ((ANY $x.objects.desc CONTAINS[c] %@) OR (ANY $x.objects.desc BEGINSWITH[c] %@)))).@count != 0)", [NSString stringWithFormat:@" %@",subString],subString ];
现在我需要阻止没有布尔组合的对象为true,即: 即如果P = $ x.isAllowed,S = $ x.shouldByPass则必须将布尔运算P' S == TRUE添加到NSPredicate。
这是可行的还是可行的?