自定义模板文件夹xctemplate

模版文件夹体系/底层公开文件夹体系(xctemplate)
系统UIViewController自带模版文件夹体系

文件模板路径存放位置:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/FileTemplates
进入Source文件夹
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/FileTemplates/Source复制CocoaTouchClass.xctemplate模版粘贴
至 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/FileTemplates/Custom文件夹内
自定义模板文件夹xctemplate
因为本例子只要说明ViewController模板是如何生成,需要修改下面的内容:
自定义模板文件夹xctemplate
4文件夹的名字前缀改成自己的命名
进入HYViewControllerObjective-C文件夹先修改.h文件:
自定义模板文件夹xctemplate
修改.m文件,将.m中的内容替换成自定义的模块代码:
自定义模板文件夹xctemplate打开TemplateInfo.plist修改其中配置:
自定义模板文件夹xctemplate自定义模板文件夹xctemplate保存退出。