从Finder拖动后如何处理文件和文件夹结构

How to handle files and folders structure after dragging from Finder

我需要创建一个简单的应用程序,允许用户将多个文件和文件夹拖放到某个树列表中,然后将它们显示给用户。

我需要的一个很好的例子:

我应该使用什么最好的组件? 我只是想在开始之前听取建议。

你的问题太宽泛了,但我会为你指出正确的方向:

• 对于您的数据模型,您需要使用 NSTreeController

• 对于您的视图,NSOutlineView。

这里有一些例子:

• Apple 的 SourceView - https://developer.apple.com/library/mac/samplecode/SourceView/Introduction/Intro.html

http://daemonconstruction.blogspot.in/2012/03/simplest-nstreecontroller-example.html