本文介绍了实现从NSImageView的拖动并将图像保存到文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我研究过苹果的例子:CocoaDragAndDrop。我理解如何将图像拖动到NSImageView并在视图之间拖动图像。但是,我仍然不知道如何拖动一个图像,并将其保存到一个文件,当图像被放到Finder。
I've studied Apple's example: CocoaDragAndDrop. I understand how to drag a image to NSImageView and drag an image between views. However, I still don't known how to drag an image and save it to a file when the image is dropped onto the Finder.
任何人都能给我一个例子吗?
Can anybody give me a example?
推荐答案
我终于找到了如何做。我在Github上写了一个
I finally found out how to do it. And I wrote a demo on Github
这篇关于实现从NSImageView的拖动并将图像保存到文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!