Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NSArray *predicates = [[NSMutableArray alloc] init];
- for (NSInteger i = 0; i < [neighbourUIDs count]; i++) {
- NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF.neighbourhood ==[c] '%1$@'", neighbourUIDs[i]];
- [predicates addObject:predicate];
- }
- NSString *hq = @"Headquarters";
- NSPredicate *hqPredicate = [NSPredicate predicateWithFormat:@"SELF.neighbourhood ==[c] %@", hq];
- [predicates addObject:hqPredicate];
- NSPredicate *finalPredicate = [NSCompoundPredicate orPredicateWithSubpredicates:predicates];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement