ios 我的项目在 Xcode 4 中的资源文件夹在哪里?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5343590/
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
Where is the resources folder for my project in Xcode 4?
提问by ronaldus_magnus
When I create a new project in Xcode 4 it does not create the resources folder like Xcode 3 used to do. Is there a setting in Xcode 4 to make this work?
当我在 Xcode 4 中创建一个新项目时,它不会像以前的 Xcode 3 那样创建资源文件夹。Xcode 4 中是否有设置可以完成这项工作?
回答by Brad Larson
As badcat indicates in his comments, the Resources folder was merely a group within the project template. To create your own Resources group, either right-click on the project explorer view and choose New Group
, or go to the menu option File | New | New Group
.
正如 badcat 在他的评论中指出的那样,Resources 文件夹只是项目模板中的一个组。要创建您自己的资源组,请右键单击项目资源管理器视图并选择New Group
,或转到菜单选项File | New | New Group
。
If you want to make sure that items which should be resources are copied into the correct location in your application bundle, you can click on the name of your project in the project explorer on the left of the screen and go to the Build Phases
tab. You can expand the Copy Bundle Resources
build phase (or whatever it's called in your project) and see the files that will be copied over. If something is missing, you can drag it into that list from the project explorer.
如果你想确保这应该是资源项目复制到您的应用程序包的正确位置,您可以在屏幕左侧的Project Explorer中点击你的项目的名称,然后转到Build Phases
选项卡。您可以展开Copy Bundle Resources
构建阶段(或在您的项目中调用它的任何内容)并查看将被复制的文件。如果缺少某些内容,您可以将其从项目资源管理器中拖到该列表中。
回答by BastiBen
Not sure what you mean by "Resources" folder, but maybe this answer helps you with that:
不确定“资源”文件夹是什么意思,但也许这个答案可以帮助你:
回答by Johannes Fahrenkrug
Check out this question if you don't just want the groupbut also the physical folderon your filesystem: How do I get the resources folder back in Xcode 4?
如果您不仅需要组,还需要文件系统上的物理文件夹,请查看此问题:如何在 Xcode 4 中获取资源文件夹?