I'm using an NSImageView
that is setup as an image well so users can add their own images. An image can be added to the NSImageView
with drag and drop or copying and pasting the actual image, but does not work properly if the image file is copied in Finder then pasted into the NSImageView
. How do I get image files that have been copied from Finder to be pasted into the image view as the correct image instead of the default jpeg icon?
Here is the code I'm using the create the view:
let view = NSImageView()
view.isEditable = true
view.allowsCutCopyPaste = true
And here is what appears in the image view when a jpeg file is copied from Finder and pasted in the image view: