Reputation: 60
Hi Guys i was wondering how to set the image of an UIimageView that is in a cell. I'm rather new to coding so please fully explain if u can. I currently have this:
cell.image.image = [tempObject objectForKey:@"CafeImage"];
But the app crashes with this everytime:
-[PFFile imageAsset]: unrecognized selector sent to instance 0x7a96cd80 2015-02-22 15:06:19.616 Cafe[12830:140389] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[PFFile imageAsset]: unrecognized selector sent to instance 0x7a96cd80'
Upvotes: 0
Views: 51
Reputation: 1313
first - If you are using a standard cell, you should set
cell.imageView.image = "UIImage object";
second - Data in [tempObject objectForKey:@"CafeImage"] must be kind of UIImage class, or if it's NSString -> use [UIImage imageName:@"for example - objectForKey"];
Upvotes: 0
Reputation: 11201
It should be cell.imageView.image=[tempObject objectForKey:@"CafeImage"];
Upvotes: 1