NSDictionary* d = [NSDictionary dictionaryWithObjectsAndKeys:@"obj1",@"key1",
@"obj2",@"key2",
@"obj3",@"key3",
@"obj4",@"key4",nil];
for (id key in [d allKeys]) {
NSLog(@"%@ - %@",key,[d objectForKey:key]);
}
Выходы:
keytest[7880:a0f] key3 - obj3
keytest[7880:a0f] key1 - obj1
keytest[7880:a0f] key4 - obj4
keytest[7880:a0f] key2 - obj2