void
describeDictionary (NSDictionary *dict)
{
NSArray *keys;
int i, count;
id key, value;
keys = [dict allKeys];
count = [keys count];
for (i = 0; i < count; i++)
{
key = [keys objectAtIndex: i];
value = [dict objectForKey: key];
NSLog (@"Key: %@ for value: %@", key, value);
}
}
As usual, this code is just an example of how to enumerate all the
entries in a dictionary; in real life, to get a description of a NSDictionary,
you just do NSLog (@"%@", myDictionary);.