Xcode:code snippet library 备份
前往文件夹:
~/Library/Developer/Xcode/UserData/CodeSnippets/
下面是我经常使用到的一些snippet:
Title: Animation Block
Completion Shortcut: ab
Completion Scopes: Function or Method
void (^<#Title#>)(void) = ^{ };
Title: Animation Completion Block
Completion Shortcut: acb
Completion Scopes: Function or Method
void (^<#Title#>)(BOOL) = ^(BOOL finished) { };
Title: Notification Add
Completion Shortcut: na
Completion Scopes: Function or Method
[[NSNotificationCenter defaultCenter] addObserver:<#Observer#> selector:<#Selector#> name:<#Name#> object:<#Object#>];
Title: Notification Remove
Completion Shortcut: nr
Completion Scopes: Function or Method
[[NSNotificationCenter defaultCenter] removeObserver:<#Observer#> name:<#Name#> object:<#Object#>];
Title: NSLog
Completion Shortcut: log
Completion Scopes: Function or Method
NSLog(@"<#Log#>");
Title: Private Interface
Completion Shortcut: pi
Completion Scopes: Top Level
@interface <#Title#> ()
@end
Title: Property Assign
Completion Shortcut: pa
Completion Scopes: All
@property (assign, nonatomic)
Title: Property Strong
Completion Shortcut: ps
Completion Scopes: All
@property (strong, nonatomic)
Title: Property Unsafe Unretained
Completion Shortcut: pu
Completion Scopes: All
@property (unsafe_unretained, nonatomic)