问题描述
我在xcode 4项目模板中添加文件夹引用时遇到一些问题,我只能将Groups和Sub Groups添加到项目中.有没有人成功做到这一点?请在这里分享.
i have some problems about adding folder reference in xcode 4 project template, i just can add Groups and Sub Groups to project. does anyone successed doing this? please share here..
这是我用来添加组的代码:
here's the code that i use to add Group:
<key>Definitions</key>
<dict>
<key>main.h</key>
<dict>
<key>Path</key>
<string>main.h</string>
<key>Group</key>
<string>css</string>
</dict>
</dict>
<key>Nodes</key>
<array>
<string>main.h</string>
</array>
该代码只是生成Group而不是Folder Reference ...请帮助我
that code just generate Group not a Folder Reference...please help me
*对不起,我的英语有点奇怪,哈哈
*sorry my english a bit strange, haha
推荐答案
如果要将文件添加到文件夹,则应在定义文件的任何地方(即在定义和节点部分)
If you want your file to be added to a folder, then you should reference it with its full desired path everywhere you define it (namely in the definitions and in the nodes section)
<key>Definitions</key>
<dict>
<key>css/main.h</key>
<dict>
<key>Path</key>
<string>main.h</string>
<key>Group</key>
<string>css</string>
</dict>
<key>Nodes</key>
<array>
<string>css/main.h</string>
</array>
这篇关于如何在XCode 4项目模板中添加文件夹引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!