Created
July 20, 2011 15:25
-
-
Save azu/1095172 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をループする | |
NSDictionary *dict = | |
[NSDictionary dictionaryWithObjectsAndKeys: | |
@"futaba", @"name", [NSNumber numberWithInt:4], @"age", | |
@"white", @"color", nil]; | |
NSArray *keys = [dict allKeys]; | |
for (i = 0; i < [keys count]; i++) { | |
NSLog(@"key: %@, value: %@\n", | |
[keys objectAtIndex:i], | |
[dict objectForKey:[keys objectAtIndex:i]]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment