How do you set up an object in interface builder that will allow the user to submit an image (like when editing a vCard in Address Book) and save it to the corresponding entry in the database being managed by Core Data?
Solution
Use an NSImageView
object. On the first panel of the inspector for the object, you'll see a checkbox marked Editable
that will allow you to decide whether to accept submissions or just display output.
Bindings for the object are as follows:
-> Value.Data
Bind to: Source Entity
Controller Key: selection
Model Key Path: Name of the attribute within the entity storing the image data