Last active
August 29, 2015 14:02
-
-
Save fjolnir/02851c79fa40db4233bb to your computer and use it in GitHub Desktop.
This file contains hidden or 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
- (NSDictionary *)cy_flippedDictionary | |
{ | |
NSArray * const keys = [self allKeys]; | |
NSArray * const vals = [self objectsForKeys:keys notFoundMarker:[NSNull null]]; | |
return [NSDictionary dictionaryWithObjects:keys forKeys:vals]; | |
} |
Nice, thanks
no problem :P
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
NSArray *keys = [self allKeys];
NSArray *values = [self objectsForKeys:keys notFoundMarker:[NSNull null]];
NSDictionary *flipped = [NSDictionary dictionaryWithObjects:keys forKeys:values];