tableView cell 选中颜色的改变
来源:互联网 发布:错生网络剧1 20集资源 编辑:程序博客网 时间:2024/06/10 04:25
1.系统默认的颜色设置
1 //无色2 cell.selectionStyle=UITableViewCellSelectionStyleNone;3 //蓝色,也就是系统默认的颜色4 cell.selectionStyle=UITableViewCellSelectionStyleBlue;5 //灰色6 cell.selectionStyle=UITableViewCellSelectionStyleGrap;
2.自定义UITableViewCell选中后的背景颜色和背景图片
1 UIColor* color=[[UIColor alloc]initWithRed:0.0 green:0.0 blue:0.0 alpha:1];//通过RGB来定义颜色2 cell.selectedBackgroundView=[[UIView alloc]initWithFrame:cell.frame]autorelease];3 cell.selectedBackgroundView.backgroundColor=[UIColor ***]或color;4 5 自定义选中后的背景图片6 cell.selectedBackgroundView=[[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"123.png"]]autorelease];7 设置UITableViewCell中的字体颜色时用8 cell.textLabel.highlightedTextColor=[UIColor **color];
3.定义UITableViewCell的样式
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
0 0
- tableView cell 选中颜色的改变
- tableview cell 选中不改变颜色
- TableView 点击cell,改变选中cell的高度
- TableView 点击cell,改变选中cell的高度
- tableview 自定义cell 点击cell改变cell中的label.text的字体颜色,cell复用出现问题
- tableview 自定义cell 点击cell改变cell中的label.text的字体颜色,cell复用出现问题
- 设置tableview的cell颜色
- tableview 点击cell改变cell中的label.text的字体颜色,cell复用出现问题的解决方案
- tableview 点击cell改变cell中的label.text的字体颜色,cell复用出现问题的解决方案2
- tableView 的Cell的选中状态
- 获得tableview当前选中的cell
- 获取tableview中当前选中的cell
- iOS tableview获取当前选中的cell
- 获取tableView当前选中的cell
- 动态改变tableview的cell的高度
- cell上label的背景颜色在选中状态下改变的解决办法
- iphone开发 tableview的cell选中、非选中背景图
- 点击tableview里的cell后改变cell的背景图片
- spring的各种jar包
- Excel数据如何导入SQL Server中
- 数据存储全方案,详解持久化技术
- Ubuntu Install Zhengma
- Activity的工作过程
- tableView cell 选中颜色的改变
- 剑指offer(19):树的子结构
- 前端布局时的浏览器兼容性问题
- matlab遇到的错误
- RobotFramework 入门
- 四、工厂设计模式
- scrapy安装笔记
- 程序员的书架上应该放的书
- iOS开发多线程篇—单例模式(ARC)