如何更改 Xcode 4 中的类前缀?

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

How to change the Class Prefix in Xcode 4?

xcodexcode4xcode4.2xcode4.3

提问by TigerCoding

When creating a project in Xcode 4, it asks what Class prefix to add to all new files.

在 Xcode 4 中创建项目时,它会询问要添加到所有新文件的类前缀。

Is there a way to change (or remove) this, after a project is already started?

在项目已经启动后,有没有办法改变(或删除)这个?

回答by odyth

In Xcode 4.3 at least it is persistent. To change it click on your project then in the right hand menu there is an option to change it. If you don't have the right hand menu open hit the button up at the top to make it appear.

至少在 Xcode 4.3 中它是持久的。要更改它,请单击您的项目,然后在右侧菜单中有一个更改它的选项。如果您没有打开右手菜单,请点击顶部的按钮使其出现。

enter image description here

在此处输入图片说明

回答by Aswathy Bose

To add class prefix or change prefix for a project

为项目添加类前缀或更改前缀

enter image description here

在此处输入图片说明

While adding new files to the project, we get the filename with the prefix where we can append the rest of the filename.

在向项目添加新文件时,我们会得到带有前缀的文件名,我们可以在其中附加文件名的其余部分。

enter image description here

在此处输入图片说明

Hope this will help you :)

希望能帮到你 :)

回答by Joshua Nozzi

Outdated Answer- Recent versions use this prefix for all new classes now.

过时的答案- 最近的版本现在将此前缀用于所有新类。

This only affects the files created from a project templatewhen you create a new project. It's not a persistent setting and has no affect when creating new files.

这只会影响在您创建新项目时从项目模板创建的文件。它不是永久性设置,在创建新文件时没有影响。