Sort File List in Xcode4?

浪子不回头ぞ 提交于 2019-12-19 03:24:18

问题


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

So:

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

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


回答1:


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!

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

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!

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.

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.




回答2:


You can have it sorted in the jump bar: XCode 4 Sort Files By Name



来源:https://stackoverflow.com/questions/6024179/sort-file-list-in-xcode4

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!