修改xcode模板

2016-03-29  本文已影响122人  TsingQue

修改xcode的模板呀~你可以改里面的任意字段

例如咱们文件头、

//  SHLeftMenu.m

//  SHNews

//  Created by HaoSun on 16/3/29.

//  Copyright © 2016年 LX. All rights reserved.

 我现在想添加一部分信息 例如如下

//  类名: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

/*

请输入你想输入的信息

*/

@end

好了可以开始了,其实很简单

修改路径

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/File/ Templates/Source/Cocoa Touch Class.xctemplate/

有人补充到 修改自定义view的时候,基本都是会重写父类的

- (instancetype)initWithFrame:(CGRect)frame;

- (void)layoutSubviews;

方法,但是每次自定义view都要自己手写这些方法是在是浪费时间,也可以修改XCode中的模板来实现自定义

上一篇 下一篇

猜你喜欢

热点阅读