XCode 4 添加子项目
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5784561/
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 Adding a Sub Project
提问by Ray
I am looking at somebody else's project and they have another project embedded under 'Other Sources'. When I click on the project it shows me the build settings etc, and I can expand all the source underneath.
我正在查看其他人的项目,他们在“其他来源”下嵌入了另一个项目。当我点击项目时,它会显示构建设置等,我可以展开下面的所有源代码。
I want to do the same thing, but when I drag an xcodeproj file into my project I don't get the build settings or any of the source shown like in this other project. How do I do this?
我想做同样的事情,但是当我将 xcodeproj 文件拖到我的项目中时,我没有得到构建设置或其他项目中显示的任何源代码。我该怎么做呢?
Thanks Ray
谢谢雷
回答by MacTeo
Just be sure that your added project is not open in another Xcode window.
请确保您添加的项目没有在另一个 Xcode 窗口中打开。
BTW this is still valid with Xcode 7.2 beta.
顺便说一句,这对 Xcode 7.2 beta 仍然有效。
回答by Tek Yin
Sorry to revamp the old question, but I just got the absolute answer for this problem.... maybe this can help the other....
很抱歉修改旧问题,但我刚刚得到了这个问题的绝对答案......也许这可以帮助另一个......
To add Sub-Project to current project, It just simply drag the .xcodeproj
from finder to xcode, place it in your project...
要将子项目添加到当前项目,只需将.xcodeproj
查找器拖到xcode 中,将其放置在您的项目中...
BUT... there is something must be done before doing this.... JUST OPEN ONE XCODE INSTANCE.... So, close the other instance when dragging .xcodeproj
to xcode....
但是......在这样做之前必须做一些事情......只需打开一个XCODE实例......因此,在拖动.xcodeproj
到xcode时关闭另一个实例......
If you drag it while opening few xcode instance (opening few project at once), the .xcodeproj
that you dragged can't be expanded and not just what you want...
如果您在打开几个 xcode 实例时拖动它(一次打开几个项目),.xcodeproj
您拖动的将无法展开,而不仅仅是您想要的……
hope this can help the other....
希望这可以帮助其他....
Regards
问候
回答by edc1591
When you drag the new project to the source list in Xcode, make sure you drop it on top of the project header (the thing that you click to get to the build settings and targets).
当您将新项目拖到 Xcode 中的源列表中时,请确保将其放在项目标题的顶部(您单击以访问构建设置和目标的内容)。