I am looking for a cocoa example that illustrates how to drag an image from one window to another. If not I would like to see an example that shows dragging an image from a source and destination in the same window. If anyone has a link to any such examples I would greatly appreciate it.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Searching for "drag and drop" on Apple's sample code page gives:
- http://developer.apple.com/mac/library/samplecode/CocoaDragAndDrop/index.html
- http://developer.apple.com/mac/library/samplecode/DragAndDrop_Shell/index.html
- http://developer.apple.com/mac/library/samplecode/DragItemAround/index.html
- http://developer.apple.com/mac/library/samplecode/DragNDropOutlineView/index.html