自定义更改 Xcode 新建 .h/.m 文件头部注释说明(文件名、工程名、作者、公司、版权等)信息
使用 Xcode 新建工程文件时,或默认生成一套注释说明信息在 .h/.m 文件的头部,说明了创建这个文件的名称、工程名、日期、作者、公司、版权等信息
// // ___FILENAME___ // ___PROJECTNAME___ // // Created by ___FULLUSERNAME___ on ___DATE___. //___COPYRIGHT___ // ___IMPORTHEADER_cocoaTouchSubclass___ @interface ___FILEBASENAMEASIDENTIFIER___ : ___VARIABLE_cocoaTouchSubclass___ @end
如果需要自定义时,可以找到 ___FILEBASENAME___ 文件(如👆),修改内容注释,重启 Xcode 即可
ps:___FILEBASENAME___ 文件目录是 应用程序,找到 Xcode ,显示包内容,然后按目录 Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/File\ Templates/Source/Cocoa\ Touch\ Class.xctemplate/NSObjectObjective-C 找到即可。
在编辑文件时,会遇到权限读写更改的提示。“Could not add write permission to the file because you do not own it. Try modifying the permissions of the file in the Finder or Terminal.”