ZBSnippetTools
选中文案->快捷 添加 import
会追加在顶部import最后一行;
ZBPeopleOBject
->
#import "ZBPeopleOBject.h"
选中含有"@implementation"关键字的字符串会对它进行声明extension
@implementation ViewController
->
@interface ViewController ()
@end
@implementation ViewController
选中文案->快捷添加方法
放到到当前选中文案的方法之下;
如果当前选中不是方法,则在@end之上;
如果选择的line,含有EventTouchUpInside,将全局搜索,定位到其他btn事件所在的位置之上;
[btn addTarget:self action:NSSelectorFromString(@"btnClick") forControlEvents:UIControlEventTouchUpInside];
[btn addTarget:self action:@selector(btnClick:::) forControlEvents:UIControlEventTouchUpInside];
- (void)btnClick:(id)arg1 arg2:(id)arg2 arg3:(id)arg3
{
}
- (void)btnClick
{
}
必须选中含有 "NS_ENUM" 或者 "NS_OPTIONS" 开始
以 "}" 作为结束;
typedef NS_ENUM(NSInteger, ZBAAAAType) {
ZBAAAATypePic, //图文
ZBAAAATypeProduct, //商品
};
switch (<#expression#>) {
case ZBAAAATypePic:
<#statements#>
break;
case ZBAAAATypeProduct:
<#statements#>
break;
default:
break;
}
要求按照oc规范命名
@interface ViewController ()
titleLabel
->
@property (nonatomic, strong) UILabel *titleLabel;
@end