Tableview 默认选中第一行以及选中背景自定义
2015-10-12 16:50
225 查看
//默认选中第一行
NSIndexPath *firstPath=[NSIndexPath indexPathForRow:0 inSection:0];
[_firstTableView selectRowAtIndexPath:firstPath animated:YES scrollPosition:UITableViewScrollPositionTop];
//选中背景自定义
cell.selectedBackgroundView=[[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"cell_selected_bg"]]autorelease];
NSIndexPath *firstPath=[NSIndexPath indexPathForRow:0 inSection:0];
[_firstTableView selectRowAtIndexPath:firstPath animated:YES scrollPosition:UITableViewScrollPositionTop];
//选中背景自定义
cell.selectedBackgroundView=[[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"cell_selected_bg"]]autorelease];
相关文章推荐
- Kconfig详解
- 第6周项目4 - 数制转换
- ios动画
- 分组对列扁平化(列转换行 关系型转换NoSQL)
- 各种距离
- srm 551
- Mac OS X下搭建Android开发环境
- Jquery下Ajax与PHP数据交换
- css3 2D变换 transform
- django 模板中定义临时列表
- Ruby 的环境搭建及安装
- cron 编辑器修改
- android 中 系统日期时间的获取
- UITableViewCell的选中时的颜色及tableViewCell的selecte与deselecte
- java中获得当前执行线程的名称
- PHP之php_curl.dll错误解决方法
- 第四周项目3单链表应用(2)
- 第七周—项目 - 负数把正数赶出队列
- 第七周 周一 链队
- 51nod 活动安排问题 (贪心)