修改xcode的模板呀~你可以改里面的任意字段
例如咱們文件頭、
//? SHLeftMenu.m
//? SHNews
//? Created by HaoSun on 16/3/29.
//? Copyright ? 2016年 LX. All rights reserved.
?我現(xiàn)在想添加一部分信息 例如如下
// ?類名:SHLeftMenu.m
// 工程名: ?SHNews
//? Created by HaoSun on 16/3/29.
//? Copyright ? 2016年 LX. All rights reserved.
還有咱們要成為下面這種效果
//? SHViewController.m
//? SHNews
//? Created by HaoSun on 16/3/29.
//? Copyright ? 2016年 xx. All rights reserved.
#import "SHViewController.h"
@implementation SHViewController
/*
請(qǐng)輸入你想輸入的信息
*/
@end
好了可以開始了,其實(shí)很簡(jiǎn)單
修改路徑
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/File/ Templates/Source/Cocoa Touch Class.xctemplate/
有人補(bǔ)充到 修改自定義view的時(shí)候,基本都是會(huì)重寫父類的
- (instancetype)initWithFrame:(CGRect)frame;
- (void)layoutSubviews;
方法,但是每次自定義view都要自己手寫這些方法是在是浪費(fèi)時(shí)間,也可以修改XCode中的模板來(lái)實(shí)現(xiàn)自定義