What is the SIMPLEST way to save a UIImageView
to a CoreData Database. I have tried this:
Save:
UIImage *image = imageView.image;
NSData *imageData = UIImagePNGRepresentation(image);
[newContact setValue:imageData forKey:@"imageViewFinal"];
Retrive:
imageView.image = [matches valueForKey:@"imageViewFinal"];
and I have added an Attribute
called 'imageViewFinal' with a Binary Data
type.
PROBLEM:
When I go to build it and click the save button, the app crashes, what's the problem?
Thanks, Seb.