在 Xcode4 中对文件列表进行排序? [英] Sort File List in Xcode4?

查看:28
本文介绍了在 Xcode4 中对文件列表进行排序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是针对 XCode 3 而不是 XCode4 的回答.XCode3 的答案 尚未得到 4 的答案.

This was answered for XCode 3, but not XCode4. Answer for XCode3 has not gotten an answer for 4.

所以:

Xcode4 有没有办法按字母顺序对 Classes 文件夹下的文件列表进行排序?看来这个选项已经消失了.

Is there a way in Xcode4 to sort my list of files under say the Classes folder Alphabetically? It appears this option has disappeared.

我很高兴删除此问题并在回答后移至 XCode3 答案,如果这能让人们更快乐.

I am happy to remove this question and move to the XCode3 answer after it has been answered, if that makes folks happier.

推荐答案

更新:大家好消息!从 Xcode 4.5 版开始,您现在可以按名称或类型排序.选择要排序的文件,然后选择 Edit >排序 >按名称.感谢@Snow-Crash 在下面的评论中提到这一点.请点赞评论!

Update: Good news, everyone! As of Xcode version 4.5, you can now sort by name or type. Select the files you want to sort and choose Edit > Sort > By Name. Thanks to @Snow-Crash for mentioning this in the comments below. Please upvote the comment!

遗憾的是,Xcode4 忽略了这一点——我喜欢这个功能.不过你可以修复它.方法如下:

This was, sadly, left out of Xcode4 -- I loved that feature. You can fix it though. Here's how:

首先,跳转到 Apple 的 Bug Reporter 并提交功能请求.说真的,继续.我等你回来.

First, jump over to Apple's Bug Reporter and file a feature request. Seriously, go ahead. I'll wait until you are back.

回来了?伟大的!我们离获得该功能又近了一步.干得好!

Back? Great! We are one step closer to getting that feature. Nice job!

现在,在 Apple 修复它之前,穷人的替代品:重新组织您的项目,使您的大部分文件位于子目录中(真实的,而不是 Xcode 逻辑组"文件夹).通常,我将文件排列在类、控制器、资源、图像、基础和支持文件中.这涵盖了我所有文件的大约 95%.每当您需要对 Xcode 中的文件重新排序时,只需删除一个文件夹引用并将其添加回来——该文件夹中的文件将再次按字母顺序排列.

Now for the poor man's substitute until Apple fixes it: Re-organize your project so most of your files sit in sub-directories (real ones, not Xcode logical "group" folders). Typically I have my files arranged in Classes, Controllers, Resources, Images, Foundation, and Supporting files. This covers about 95% of all my files. Whenever you need to reorder the files in Xcode, simply remove a folder reference and add it back -- the files in that folder will once again be in alphabetical order.

诚然,不像在 Xcode3 中那么好,但是一旦您组织了项目文件夹结构,只需花一点时间就可以轻松地重新按字母顺序排列.

Admittedly, not as nice as in Xcode3, but once you have your project folder structure organized, it just takes a moment to re-alphabetize things without too much effort.

这篇关于在 Xcode4 中对文件列表进行排序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆