Skip to content

Instantly share code, notes, and snippets.

Created December 3, 2012 17:10
Show Gist options
  • Save anonymous/4196414 to your computer and use it in GitHub Desktop.
Save anonymous/4196414 to your computer and use it in GitHub Desktop.
Prints Query 1
NSArray *tags = [all valueForKey:@"tag"];
for (int i=0 ; i<=[tags count]; i++) {
for (NSString *tagQuery in tags) {
NSLog(@"query: %@",tagQuery);
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"tag CONTAINS[cd] %@",[NSString stringWithFormat:@"%@",tagQuery]];
NSArray *roughArray = [[all filteredArrayUsingPredicate:predicate] mutableCopy];
NSArray *tagContent = [[NSSet setWithArray:roughArray] allObjects];
allTags = [NSMutableArray arrayWithObjects:tagContent, nil];
return tagContent;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment