Xcode 4:删除构建设置中的项目

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5350438/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 20:33:27  来源:igfitidea点击:

Xcode 4: deleting items in Build Settings

iphonexcodexcode4

提问by occulus

In XCode 4.0 there's a newly designed Build Settings page. My problem is that I can't see how to remove a setting once I've specified it.

在 XCode 4.0 中有一个新设计的 Build Settings 页面。我的问题是,一旦我指定了一个设置,我就看不到如何删除它。

Example: I've changed "Versioning System" to "Apple Generic" at the target level. Afterwards I realised I should set it at the project level, and so I want to delete the target level setting. However, there's no way I can see to remove the setting -- you click on it and there's two options, neither of which is the default "not specified" empty setting. Hitting the delete key on the keyboard nothing.

示例:我已在目标级别将“版本控制系统”更改为“Apple 通用”。后来我意识到我应该在项目级别设置它,所以我想删除目标级别设置。但是,我无法删除设置——你点击它,有两个选项,这两个选项都不是默认的“未指定”空设置。没有按键盘上的删除键。

The same goes for fields that accept text -- if I try to delete a setting by just deleting all the text set, it still shows that field in green, but with no text in it, and regards it as the presence of a setting.

接受文本的字段也是如此——如果我尝试通过删除所有文本集来删除设置,它仍然以绿色显示该字段,但其中没有文本,并将其视为设置的存在。

回答by Alex Reche Martinez

Delete works but you have to take care to have the proper item selected on the left hand side of the editor area.

删除有效,但您必须注意在编辑器区域的左侧选择正确的项目。

If you want to default a target setting to the project or "Mac Os Default" value, you first need to select the target on the left hand side of the editor area, go to build settings and you will be able to remove the target setting using the delete key. You will not be able to remove project settings from here though.

如果要将目标设置默认为项目或“Mac Os Default”值,首先需要在编辑器区域的左侧选择目标,转到构建设置,您将能够删除目标设置使用删除键。但是,您将无法从此处删除项目设置。

If you want to default a project setting to the "Mac Os Default" value, you first need to select the project on the left hand side of the editor area, go to build settings and only then you will be able to erase the setting of the project using the delete key.

如果要将项目设置默认为“Mac Os Default”值,首先需要在编辑器区域的左侧选择项目,转到构建设置,然后才能删除项目使用删除键。

I'm not sure if that is a bug of XCode or not. The truth is that when you are looking to the settings of a target and you hit delete, Xcode has no way to know if you want to delete a project or a target setting, because there is not way to select a column, but only rows... and it seems logical that it deletes only a target one. So it is probably the normal behavior.

我不确定这是否是 XCode 的错误。事实是,当您查看目标的设置并点击删除时,Xcode 无法知道您是要删除项目还是目标设置,因为无法选择列,而只能选择行...它只删除一个目标似乎是合乎逻辑的。所以这可能是正常行为。

回答by Joshua Nozzi

Highlighting the setting's row and hitting the delete key works for me. That is, in any non-user-defined settings, hitting delete removes all customization of the settings; in user-defined settings, it deletes the setting entirely.

突出显示设置的行并按删除键对我有用。也就是说,在任何非用户定义的设置中,点击删除会删除所有自定义设置;在用户定义的设置中,它会完全删除设置。