iOS 懒加载的写法
2015-11-16 09:55
295 查看
- (UITableView*)tableView
{
if (!_tableView) {
_tableView=[[UITableView
alloc]initWithFrame:CGRectMake(0,
64,
__kScreenWidth,
__kScreenHeight -
64)];
_tableView.delegate=self;
_tableView.dataSource=self;
_tableView.showsVerticalScrollIndicator =
NO;
_tableView.backgroundColor =
__kColorWithRGBA(250,
250, 250, 1);
_tableView.separatorStyle =
UITableViewCellSeparatorStyleNone;
[self.view addSubview:_tableView];
}
return
_tableView;
}
{
if (!_tableView) {
_tableView=[[UITableView
alloc]initWithFrame:CGRectMake(0,
64,
__kScreenWidth,
__kScreenHeight -
64)];
_tableView.delegate=self;
_tableView.dataSource=self;
_tableView.showsVerticalScrollIndicator =
NO;
_tableView.backgroundColor =
__kColorWithRGBA(250,
250, 250, 1);
_tableView.separatorStyle =
UITableViewCellSeparatorStyleNone;
[self.view addSubview:_tableView];
}
return
_tableView;
}
相关文章推荐
- 使用cMake跨iOS平台编译过程以及配置
- ios - cordova 简介
- 运行项目编译报错
- iOS---升级Xcode之后VVDocumenter-Xcode不能用的解决办法
- iOS技术点:判断用户是否开启推送开关/是否允许推送?
- 判断当前iOS设备的方法
- iOS进阶精华帖索引(cocoaChina)
- 理解iOS多线程应用的开发以及线程的创建方法
- iOS 真机调试
- Ios中Json解析的四种方法
- ios开发调用OpenAL的alcOpenDevice(NULL)方法返回NULL的原因之一
- iOS学习笔记
- IOS开学第一天
- 蜂窝教育iOS培训:如何选择教学水平高机构
- iOS AutoLayout
- EXC_BAD_ACCESS 重现
- iOS中 自定义cell升级版 (高级)
- iOS学习之-开机引导图
- iOS多线程总结
- ios流媒体--播放,下载