Last active
December 17, 2015 20:29
-
-
Save MosheBerman/5668042 to your computer and use it in GitHub Desktop.
A demo of the arrayDictionaryArray category pair.
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
// Code: | |
#import "ArrayDictionaryArray.h" | |
- (void)sampleConversion | |
{ | |
NSArray *array = @[@"Hello", @"I", @"Am", @"Deep", @"Blue"]; | |
NSDictionary *dictionary = [array dictionary]; | |
NSLog(@"Array: %@", [array description]); | |
NSLog(@"Dictionary: %@", [dictionary description]); | |
} | |
- (void) main | |
{ | |
[self sampleConversion]; | |
} | |
/* | |
OUTPUT: | |
2013-05-29 00:51:03.138 ArrayToDict[3835:c07] Array: ( | |
Hello, | |
I, | |
Am, | |
Deep, | |
Blue | |
) | |
2013-05-29 00:51:03.139 ArrayToDict[3835:c07] Dictionary: { | |
0 = Hello; | |
4 = Blue; | |
3 = Deep; | |
1 = I; | |
2 = Am; | |
} | |
*/ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment