1

I was just wondering how I could give out everything that is in NSDictionary *info:

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info

Just to see whats in it. Is there a simple way?

Regars, Philip

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Philip
  • 1,068
  • 3
  • 12
  • 21

2 Answers2

0

Sounds like you want to do:

NSLog( @"info dictionary is %@", info );

in your code.

Passing "info" to NSLog is the same as doing "[info description]", you print out the entire contents (keys and values of your dictionary).

Michael Dautermann
  • 88,797
  • 17
  • 166
  • 215
0

Here is one way you can iterate through everything in the dictionary:

NSArray *dictionaryKeys = [info allKeys];
for (NSString *key in dictionaryKeys) {
    // Do something with info[key]
}
bgfriend0
  • 1,152
  • 1
  • 14
  • 26