alanvabraham alanvabraham - 2 months ago 7
Objective-C Question

Display each item in an NSDictionary

I am trying to display each item in NSDictionary. I have tried using a for loop but that didn't work.

Answer

Try this code

for(NSString *key in [dict allKeys]) {
  NSLog(@"%@",[dict objectForKey:key]);
}