本文介绍了删除 Xcode 生成的源代码中的版权的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用 Xcode 4 创建新的源代码文件时,有什么方法可以完全删除带有版权声明的注释?

Is there any way to completely remove the comment with the copyright notice when creating a new source code file with Xcode 4?

插入:

//
//  MainView.h
//  ProjectName
//
//  Created by First Last Name on 1/2/34.
//  Copyright (c) 2012 Company Name. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface MainView : UIView

@end

我想要:

#import <UIKit/UIKit.h>

@interface MainView : UIView

@end

推荐答案

最安全的方法是创建自定义文件模板.复制一份苹果的文件模板,打开头文件,去掉介绍性的注释.有关创建自定义文件模板的更多详细信息,请参见以下文章:

The safest way to do what you want is to create a custom file template. Make a copy of Apple's file template, open the header file, and remove the introductory comments. More detailed information on creating custom file templates is in the following article:

创建自定义 Xcode 4 文件模板

这篇关于删除 Xcode 生成的源代码中的版权的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-27 16:36