Store image in master data

I want to keep an image for each employee when updating my records. How can i do this? I have a dictionary storing the name, identifier and department of employees. Now I want the image to be saved together.

Please, help

Dipanjan

+3
source share
2 answers

Master data supports the Binary Data type. When you define a model with a Binary Data field, it creates a model class with an NSData field. You can move the image to the NSData field, and CoreData will save it for you.

Then you can use UIImage initWithData: to load the image from the NSData field.

Hope this helps!

+6
source

CoreDate :

  • ImageToDataTransformer

. http://www.iphonedevsdk.com/forum/181656-post3.html

+2

Source: https://habr.com/ru/post/1795721/


All Articles