NSString 객체가있는 NSMutableArray가 있습니다. 문자열을 포함하지 않는 객체 만 가져 오도록 필터링하려면 어떻게해야합니까? 나는 문자열을 포함하는 객체 필터링 자 NSPredicate을 시도 :문자열을 포함하지 않는 NSMutableArray 객체를 필터링하는 방법은 무엇입니까?
NSString *match = @"My text";
NSPredicate *sPredicate = [NSPredicate predicateWithFormat:@"SELF CONTAINS[cd] %@", match];
[self.filesList setArray:[self.filesList filteredArrayUsingPredicate:sPredicate]];
유사한 있나요,하지만 그 반대를 필터링 할 수 있습니까? 어떤 종류의 "! contains"?
가능한 중복 http://stackoverflow.com/questions/1166401/writing-an-nspredicate - 그 조건을 충족시키지 못하면 true를 반환합니다) – jtbandes