0

要素をフィルタリングするためにNSPredicateを作成しました。

-(void)filterResult:(NSMutableArray*)array
{
    search=TRUE;
    filteredCategoryList=[[NSArray alloc]init];


    NSPredicate *predicate = [NSPredicate predicateWithFormat:@"roles beginsWith %@ ||     UserResponseDetails IN %@ ",array,array];
    filteredCategoryList = [MembersList filteredArrayUsingPredicate:predicate]; 
    [filteredCategoryList retain];
}

問題は、ロールの「sample;Example」のような文字列の1つを取得していることです。その他は単一の文字列です。Sample、Example、sample、およびExampleの要素を取得するための述語条件の記述方法。。

4

1 に答える 1