I load annotations from a plist file and also I need to read images for a pin from the plist file.
I have tried the following code but it doesn’t work.
NSString *path = [[NSBundle mainBundle] pathForResource:@"data" ofType:@"plist"];
NSDictionary *dict = [NSDictionary dictionaryWithContentsOfFile:path];
NSArray *anns = [dict objectForKey:@"Category1"];
pinView.image = [UIImage imageNamed:[[dict objectForKey:anns] valueForKey:@"Icon"]];
My plist construction:

This looks wrong:
annsis an array, so it can’t be the key of your dictionary. My guess is that you want this: