Sort NSMutableDictionary keys by object?
问题 Okeh. Here is the deal: Have have a NSMutualDictionary with words as keys (say names). The value objects is a NSNumber (like rating) NSMutableDictionary *dictionary = [[NSMutableDictionary alloc] init]; [dictionary setObject:[NSNumber intValue:1] forKey:@"Melvin"]; [dictionary setObject:[NSNumber intValue:2] forKey:@"John"]; [dictionary setObject:[NSNumber intValue:3] forKey:@"Esben"]; I want to sort them with the highest ratings first. I know I'm going to do it like this: [searchWords