Xcode自定义代码块,方便编写代码
- git clone https://github.com/xuyuqiang/xcode_codeSnippets.git
- cd xcode_codeSnippets
- sh setup.sh (此步骤会覆盖xcode中名字相同的代码块)
- 重启xcode
- 通过xcode编辑代码块
- cd xcode_codeSnippets
- sh update.sh
- git 提交修改记录
下面代码块说明: 快捷键 -> 具体代码块
@strong -> @property(nonatomic,strong) <#class#> *<#name#>;
@copy -> @property(nonatomic,copy) NSString *<#name#>;
@weak -> @property(nonatomic,weak) id<#protocol#> <#delegate#>;
@assign -> @property(nonatomic,assign) NSInteger <#name#>;
@block -> @property(nonatomic,copy) void (^<#blockName#>)(<#paramter#>);
@create -> <#class#> *<#name#> = [[<#class#> alloc] init];
@createFrame -> <#class#> *<#name#> = [[<#class#> alloc] initWithFrame:CGRectMake(x, y, w, h)];
@f -> NSLog(@"%s",FUNCTION);