Adding Image to NSPersistentDocument
I have a subclass of the NSPersistentDocument class. I want to add an image to a document. I have an image. How do I set it to a .jpg file?
0
Mayur
source
to share
1 answer
Load a JPEG file and set the resulting one NSImage
in a property of your document using the property ( self.image = [[[NSImage alloc] initWithContentsOfFile:…] autorelease]
) syntax . Meanwhile, in your nib, bind the image binding value
to a document property image
.
0
Peter hosey
source
to share