I’m trying to use this code for UIImageView in cellForRowAtIndexPath without results:
cell.favImageView.image = [UIImage imageNamed:@"favoritedItem.png"];
The image is in the bundle, correct spelling and format and all, it just won’t display. Image file is located in a group “images” but that should not matter.
How can I display this image??
Another ImageView finds an image name string in plist dictionary, this is working fine:
cell.flagImageView.image = [UIImage imageNamed:[[sortedObjects objectAtIndex:indexPath.row] valueForKey:@"Flag"]];
Ps. using a custom prototype cell and Xcode 4/storyboard.
This is my app look. I use Dynamic Prototyping Table and custom cells.
My storyboard is like below.
The point is that you should set tag of image view as below.
Don’t forget to set the cell identifier same with that in code. And the code is below: