Xcode-组和目标

扫码查看
本文介绍了Xcode-组和目标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Xcode项目.该项目目前有四个目标,我将添加更多目标.该项目中大约有150个png文件.我将所有这些都放在Xcode组和文件"面板中的组树中.

I have an Xcode project. The project currently has four targets, and I am about to add more. Within the project are about 150 png files. I have all of these in a tree of groups in the Xcode "groups and files" panel.

我想将这些png文件包含在我的某些目标中,但不要包含在其他目标中.关键是,我将始终想要它们全部或全部都不希望.我不想选择.

I want to include these png files in some of my targets, but not in others. The thing is, I will always want either all of them or none of them. I don't want to pick and choose.

有没有办法解决这个问题?基本上,我希望某些目标使用"png文件"组中的所有文件,而另一些目标则不使用任何文件.如果有一种方法可以在一个目标中包含整个组树,然后从另一个目标中删除同一棵树,而不必分别处理每个文件,那将是理想的选择.

Is there a way to manage this? Basically, I want some targets to use all of the files in the "png files" group, and others to use none of them. If there is a way to include an entire tree of groups in a target, and remove the same tree from another target, without having to do each file individually, that would be ideal.

由于缺乏回应,因此对此悬赏.如果不可能做到以上几点,我会对其他方式或多或少地完成同一件事感兴趣—例如,将所有png文件变成一个共享库是否有帮助?还是使它们本身成为目标,并让我的其他一些目标依赖于该目标?无论哪种情况,我都需要知道如何设置.

starting a bounty on this due to the lack of response. If it's not possible to do the above, I would be interested in other ways to accomplish more or less the same thing -- for example would it help to make all the png files a shared library? Or to make them a target in and of themselves, and have some of my other targets depend on that one? In either case, I would need to know how to set the thing up.

我的底线是我想尽可能简单地完成整个事情.例如,将文件添加到150并告诉我的项目应该将其包含在使用该文件组的所有目标中很容易.

My bottom line is that I want to do the whole thing as simply as possible. For example, it should be easy to add a file to the 150 and tell my project that it should be included in all targets that use that group of files.

推荐答案

我现在正在使用Xcode 3.2.3.我可以右键单击一个组,选择获取信息,然后跳转到目标"选项卡,然后选择我希望这些文件进入的目标.它对我有用,这是您要寻找的吗?

I am using the Xcode 3.2.3 right now. I am able to right click on a group, select get info then jump over to the 'Targets' tab and select my targets I want those files to go into. It works for me, is this what you are looking for?

这篇关于Xcode-组和目标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-27 20:03
查看更多