Created
December 3, 2012 17:10
-
-
Save anonymous/4196414 to your computer and use it in GitHub Desktop.
Prints Query 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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