I have an array which contains a set of UIImage in byte forms. –My partner saved the UIImage in the database, and he created an array to retrieve the data– I created this to retrieve the data from the array:
for (NSDictionary *row in arr){
NSData *imgData = [row objectForKey:@"ImageFile"];
When I put it in the NSLog, it gave the right data. However when I try to display the image using this:
UIImage *imgDis = [UIImage imageWithData:imgData];
It is giving me an error saying [__NSCFString bytes]: unrecognized selector sent to instance..
I honestly don’t know what to do, so if anyone can help me it will be greatly appreciated.
As what @Safecase said in the comments, I decided to save the image path instead of the image itself. This way, I could just use
UIImage imageWithContentsOfFile:imageFilePathto display the image. Thanks for the help!