Posted By

saturngod on 08/15/11


Tagged


Versions (?)

Show all NSDictionary Key And Value


 / Published in: Objective C
 

  1. void describeDictionary (NSDictionary *dict)
  2. {
  3. NSArray *keys;
  4. int i, count;
  5. id key, value;
  6.  
  7. keys = [dict allKeys];
  8. count = [keys count];
  9. for (i = 0; i < count; i++)
  10. {
  11. key = [keys objectAtIndex: i];
  12. value = [dict objectForKey: key];
  13. NSLog (@"Key: %@ for value: %@", key, value);
  14. }
  15. }

Report this snippet  

You need to login to post a comment.