//定义类的属性
@property (nonatomic, strong) <#type#> *<#name#>;
@property (nonatomic, weak) <#type#> *<#name#>;
@property (nonatomic, assign) <#type#> <#name#>;
@property (nonatomic, copy) <#type#> *<#name#>;
@property (nonatomic, weak)id<<#delegate#>> delegate;
@property (nonatomic,copy) <#Block#> <#block#>;
// 开启子线程并返回主线程
__weak __typeof(self) weakself=self;
dispatch_async(dispatch_queue_create(0,0), ^{
<#code#>
dispatch_async(dispatch_get_main_queue(), ^{
<#code#>
});
});
// 关闭自动调整视图
if ([selfrespondsToSelector:@selector(automaticallyAdjustsScrollViewInsets)]) {
self.automaticallyAdjustsScrollViewInsets =NO;
}
// 单例 Class直接写入要单例的类名 (即可实现单例)
static<#Class#> * s_defultmanmager = nil;
+(<#Class#> *)defulemanager{
staticdispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
s_defultmanmager = [[<#Class#> alloc]init];
});
return s_defultmanmager;
}
// 添加注释
/**
* <#内容#>
*/
#pragma mark ————————— <#内容#> —————————————
// tableView代理
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return <#expression#>
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
staticNSString *cellIdentifier = <#reuse#>;
<#Class#> *cell = [tableViewdequeueReusableCellWithIdentifier:cellIdentifier];
if (cell ==nil) {
cell = [[[<#Class#> alloc]initWithStyle:<#(UITableViewCellStyle)#> reuseIdentifier:cellIdentifier]autorelease];
}
return cell;
}