I want to display an image that is being retrieved from core data and every single cell will have a different image. I have done this but I do not know how to retrieve from this path and place the image into the cell. Anybody can help me on this? Thanks in advance.
NSString * filePath = @"01.jpg";
NSData * imageData = UIImageJPEGRepresentation([UIImage imageNamed:filePath], 0.1);
[productInfo setValue:imageData forKey:@"productImage"];
You could fetch the managed object from your model and place it in the array where the array would contain the photo names as below. I am assuming that your entity be photoStore and the column for storing the photo file name be nameOfPhoto, so the code would look like,
Now, inside the cellForRowAtIndexPath use the image name to add the image to your cell’s imageview as,
This is how you would add the store the image name into core data and then retrieve the name construct a path to it and display it.