简体   繁体   English

Xcode 5.0.1:如何使文件夹出现在项目导航器中的文件顶部

[英]Xcode 5.0.1: How to make folders appear on top of files in the Project Navigator

I've just started using Xcode and discovered that folders are mixed with files of the same level alphabetically.我刚开始使用 Xcode,发现文件夹按字母顺序与同一级别的文件混合在一起。

Is there a way to have folders displaying on top and then files of the same parent folder?有没有办法让文件夹显示在顶部,然后显示同一父文件夹的文件? Just like in TextMate's FileBrowser.就像在 TextMate 的 FileBrowser 中一样。

Current displaying is:当前显示为:

在此处输入图片说明

I want it to be:我希望它是:

在此处输入图片说明

Thanks in advance.提前致谢。

Changing the MacOS Finder preferences will cause XCode to also display folders before files at the same level.更改 MacOS Finder 首选项将导致 XCode 还在同一级别的文件之前显示文件夹。

  • Find and check the checkbox under Finder -> Preferences -> Advanced labelled Keep folders on top: In windows when sorting by name .查找并选中Finder -> Preferences -> Advanced下的复选框Keep folders on top: In windows when sorting by name

  • Restart XCode and you will find the new sort order is honored.重新启动 XCode,你会发现新的排序顺序得到遵守。

在此处输入图片说明

Just mouse-down on an item and move it.只需在一个项目上按下鼠标并移动它。 The file or folder level can also be changed this way.也可以通过这种方式更改文件或文件夹级别。 You can make folders from the menubar :File:New:Group".您可以从菜单栏“:File:New:Group”创建文件夹。

I see that you are using folder references, not groups.我看到您使用的是文件夹引用,而不是组。 If there is no specific reason to use folder references then change to use groups.如果没有使用文件夹引用的特定原因,则更改为使用组。 When dragging in a folder of files there is the option of folder references or groups.在文件文件夹中拖动时,可以选择文件夹引用或组。 Since folder references are a mirror of the directory structure and can not be changed in Xcode.由于文件夹引用是目录结构的镜像,无法在 Xcode 中更改。 I suspect the OP really wants groups.我怀疑 OP 真的想要团体。

When you are at the very bottom you can drag horizontally to select the level to move to.当您位于最底部时,您可以水平拖动以选择要移动到的级别。 See added image.请参阅添加的图像。

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM