xcode 如何更改默认版权模板

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

How to Change Default Copyright Template

xcodetemplatesxcode-template

提问by Greg

Whenever I make a new file in xcode, it puts something like this at the top of the file:

每当我在 xcode 中创建一个新文件时,它都会在文件顶部放置如下内容:

//  Copyright __MyCompanyName__ 2008.  All rights reserved.

How can I change that to something useful?

我怎样才能把它改成有用的东西?

Update: found the answer here.

更新:在这里找到答案

回答by Chuck

As of Xcode 3, it will use the "company" field from your Address Book card.

从 Xcode 3 开始,它将使用地址簿卡片中的“公司”字段。

回答by Francois Nadeau

Follow these steps to change the copyright:

请按照以下步骤更改版权:

enter image description here

在此处输入图片说明

Note: The change is for new files that you create, so you will need to update the ones that had been previously created manually.

注意:更改适用于您创建的新文件,因此您需要更新之前手动创建的文件。

回答by eadsjr

As of Xcode 6.1.1 this can be changed by clicking on the main .xcodeproj file in the project view (the blue one). The right panel has a field called 'Organization' that will be used for the copyright template. This panel may be hidden, and can be made visible with a button in the upper right corner.

从 Xcode 6.1.1 开始,这可以通过单击项目视图(蓝色)中的主 .xcodeproj 文件来更改。右侧面板有一个名为“组织”的字段,将用于版权模板。该面板可以隐藏,可以通过右上角的按钮显示。