UITableViewCell 选中时的颜色设置
来源:互联网 发布:linux中mount命令 编辑:程序博客网 时间:2024/06/07 06:42
- 1.系统默认的颜色设置
- 1.系统默认的颜色设置
- //无色
- cell.selectionStyle = UITableViewCellSelectionStyleNone;
- //蓝色
- cell.selectionStyle = UITableViewCellSelectionStyleBlue;
- //灰色
- cell.selectionStyle = UITableViewCellSelectionStyleGray;
2.自定义颜色和背景设置
改变UITableViewCell选中时背景色:
UIColor *color = [[UIColoralloc]initWithRed:0.0green:0.0blue:0.0alpha:1];//通过RGB来定义自己的颜色
- cell.selectedBackgroundView = [[[UIView alloc] initWithFrame:cell.frame] autorelease];
- cell.selectedBackgroundView.backgroundColor = [UIColor xxxxxx];
3自定义UITableViewCell选中时背景
- cell.selectedBackgroundView = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"cellart.png"]] autorelease];
- 还有字体颜色
- cell.textLabel.highlightedTextColor = [UIColor xxxcolor]; [cell.textLabel setTextColor:color];//设置cell的字体的颜色
4.设置tableViewCell间的分割线的颜色
[theTableView setSeparatorColor:[UIColor xxxx ]];
0 0
- UITableViewCell的选中时的颜色设置
- UITableViewCell的选中时的颜色设置
- UITableViewCell的选中时的颜色设置
- UITableViewCell的选中时的颜色设置
- UITableViewCell的选中时的颜色设置
- UITableViewCell的选中时的颜色设置
- UITableViewCell的选中时的颜色设置
- UITableViewCell的选中时的颜色设置
- UITableViewCell的选中时的颜色设置
- UITableViewCell的选中时的颜色设置
- UITableViewCell的选中时的颜色设置
- UITableViewCell的选中时的颜色设置
- UITableViewCell的选中时的颜色设置
- UITableViewCell的选中时的颜色设置
- UITableViewCell的选中时的颜色设置
- UITableViewCell的选中时的颜色设置
- UITableViewCell的选中时的颜色设置
- UITableViewCell的选中时的颜色设置
- VS2010项目属性的默认包含路径设置方法
- CentOS7下三步安装单点OpenStack【KVM、VMwareOK】
- 什么是数据持久化?
- 替换空格
- 第二部分:进程管理
- UITableViewCell 选中时的颜色设置
- JavaScript学习笔记六:Map和Set
- mssql 两个日期之间序列
- 【Linux】graphchi-cpp 程序运行说明
- Android 点9图片 Can't have more than one marked region 解决方法
- js正则表达式语法
- 第三部分:内存管理
- 代码与标准如何对应
- 面试笔记----------HashMap排序