Collection of live templates for AppCode
Insert weak reference to self.
__weak typeof(self) weakSelf = self;
Insert dispatch after code block.
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, $TIME$ * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
$CODE$;
});
Insert dispatch time code block.
dispatch_time(DISPATCH_TIME_NOW, $SECONDS$ * NSEC_PER_SEC)
Insert dispatch async on main queue block.
dispatch_async(dispatch_get_main_queue(), ^{
$END$
})
Insert nonatomic strong property.
@property(nonatomic, strong) $DECLARATION$;$END$
Insert nonatomic weak property.
@property(nonatomic, weak) $DECLARATION$;$END$
Insert private category code block.
@interface $CLASS_NAME$ ()
$END$
@end
Insert string with format snippet.
[NSString stringWithFormat:@"$FORMAT$", $ITEMS$];$END$
Clone this repository in ~/Library/Preferences/<product><version>/templates
and restart AppCode.