OK so I know that dictionaries can\'t be sorted. But, say I have NSMutableArray *keys = [someDictionary allKeys]; Now, I want to sort those keys, based on the corre
NSMutableArray *keys = [someDictionary allKeys];
NSArray *keys = [someDictionary allKeys]; NSArray *sortedKeys = [keys sortedArrayUsingComparator:^NSComparisonResult(id a, id b) { NSString *first = [someDictionary objectForKey:a]; NSString *second = [someDictionary objectForKey:b]; return [first compare:second]; }];