Reputation: 111
I want to store image for every employee while updating their records. How can I do that?
I have a dictionary storing name, id and department of employees. Now i want the image to be saved together.
Upvotes: 3
Views: 1709
Reputation: 1300
Core Data supports the "Binary Data" type - When you define a model with a Binary Data field, it creates your model class with an NSData field. You can move an image into the NSData field, and CoreData will save it for you.
You can then use UIImage initWithData: to load the image from the NSData field.
Hope this helps !
Upvotes: 6
Reputation: 3517
For strore image as CoreDate attribute need:
See here for an example http://www.iphonedevsdk.com/forum/181656-post3.html
Upvotes: 2