xcode 4 带有目标的文件列表
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5422939/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
xcode 4 list of files with target
提问by hfossli
In Xcode 3 it was easy to get an overview of which files are activated for current active target. I love the new feature in Xcode 4 where you can see all the targets a specific file is active for (its like an inversed view of xcode 3). Is there some mysterious way of getting that good ol' view back?
在 Xcode 3 中,很容易概览当前活动目标激活了哪些文件。我喜欢 Xcode 4 中的新功能,您可以在其中查看特定文件处于活动状态的所有目标(就像 xcode 3 的反向视图)。有没有什么神秘的方法可以让你恢复那种美好的看法?
It would be really handy when specifying test-files and nibs for different targets...
为不同的目标指定测试文件和笔尖时会非常方便......
Image from that good ol' list in xcode 3:
来自 xcode 3 中那个好的 ol' 列表的图像:
回答by Nate Petersen
Expanding on tomwhipple's answer, there is a way to see all the files that are not part of a target.
扩展 tomwhipple 的答案,有一种方法可以查看不属于目标的所有文件。
Go to -> Build Phases -> Compile Sources and hit the '+' button. This will show you all the files that are not part of the target. However, this list is pretty cluttered with things that really shouldn't be in your target. But you can type ".m" in the search bar to only show the classes that aren't included.
转到 -> Build Phases -> Compile Sources 并点击“+”按钮。这将向您显示不属于目标的所有文件。但是,此列表中充斥着不应该在您的目标中的内容。但是您可以在搜索栏中键入“.m”以仅显示未包含的类。
回答by Joshua Nozzi
By Target: Navigate to the project, then select the target and expand the various build phases. It's more specific because it shows you what role the file(s) play in the target.
按目标:导航到项目,然后选择目标并展开各个构建阶段。它更具体,因为它向您展示了文件在目标中扮演的角色。
By file: Select the file in the navigator and open the Utility pane. The targets list is shown there (but only for that one file).
按文件:在导航器中选择文件并打开实用程序窗格。目标列表显示在那里(但仅针对该文件)。
回答by tomwhipple
I also find this lack of a checkmark list annoying. I did notice that you can add multiple files to a target via the + icon at the bottom of the compile sources list in the "by target" method.
我还发现缺少复选标记列表很烦人。我确实注意到您可以通过“按目标”方法中编译源列表底部的 + 图标将多个文件添加到目标。