iOS开发UITableViewCell的选中时的颜色设置
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]
4.设置tableViewCell间的分割线的颜色
- [theTableView setSeparatorColor:[UIColor xxxx ]];
iOS开发UITableViewCell的选中时的颜色设置的更多相关文章
- iOS开发UITableViewCell的选中时的颜色设置(转)
iOS开发UITableViewCell的选中时的颜色设置 1.系统默认的颜色设置 //无色 cell.selectionStyle = UITableViewCellSelectionStyle ...
- 【转】iOS开发UITableViewCell的选中时的颜色设置
原文网址:http://mobile.51cto.com/hot-404900.htm 1.系统默认的颜色设置 //无色 cell.selectionStyle = UITableViewCellSe ...
- UITableViewCell的选中时的颜色设置
转自:http://hi.baidu.com/zhu410289616/item/0de0262910886011097508c2 1.系统默认的颜色设置 //无色 cell.selectionSty ...
- IOS - UITableViewCell的选中时的颜色及tableViewCell的selecte与deselecte
1.系统默认的颜色设置 [cpp] view plaincopy //无色 cell.selectionStyle = UITableViewCellSelectionStyleNone; //蓝色 ...
- iOS设置UITableViewCell的选中时的颜色
1.系统默认的颜色设置 //无色 cell.selectionStyle = UITableViewCellSelectionStyleNone; //蓝色 cell.selectio ...
- UITableViewCell的选中时的颜色及tableViewCell的selecte与deselecte
1.系统默认的颜色设置 //无色 cell.selectionStyle = UITableViewCellSelectionStyleNone; //蓝色 cell.selectionStyle = ...
- iOS开发UI篇—iOS开发中三种简单的动画设置
iOS开发UI篇—iOS开发中三种简单的动画设置 [在ios开发中,动画是廉价的] 一.首尾式动画 代码示例: // beginAnimations表示此后的代码要“参与到”动画中 [UIView b ...
- iOS UITabBarItem 选中图的颜色,设置UIimage的渲染模式
UITbarController之前有在这篇文章讲解:http://www.cnblogs.com/niit-soft-518/p/4447940.html 如果自定义了UITabBarItem的图片 ...
- iOS:扩展UIColor,支持十六进制颜色设置
来自转载:http://my.oschina.net/leejan97/blog/307491 摘要: 可以直接使用十六进制设置控件的颜色,而不必通过除以255.0进行转换 #define UICol ...
随机推荐
- [LeetCode]题解(python):121-Best Time to Buy and Sell Stock
题目来源: https://leetcode.com/problems/best-time-to-buy-and-sell-stock/ 题意分析: 给定一个数组,代表array[i] 代表第i天的价 ...
- 帝国cms7.0,列表模板调用不支持附表字段
帝国cms在制作列表模板时,是不支持一些字段的调用的,原因是因为有些字段所在的位置为附表,本段详细向你介绍 帝国如何调用副表字段 我们可在 系统---管理数据表---管理字段中查看 如果我们需要调用附 ...
- bootstrap读书笔记
引入bootstrap.js或单个插件的js文件 若引入单个插件的js文件,注意插件之间的依赖关系 data属性api data属性的api很方便,但我们也可以选择关闭这个功能:$(document) ...
- perl5 附录一 函数集(未定稿)
附录一 函数集(未定稿) by flamephoenix 一.进程处理函数 1.进程启动函数 2.进程终止函数 3.进程控制函数 4.其它控制函数二.数学函数三.字符串处理函数四.标量转换函数 ...
- live555学习经验链接一
live555学习经验链接:http://xingyunbaijunwei.blog.163.com/blog/#m=0&t=1&c=fks_084071082087086069082 ...
- java.lang.class.getResource
静态块,在项目启动的时候就执行,是主动执行的. 静态方法, 是被动执行的,需要被调用才执行. static{ try { String path = Conf ...
- mySQL中replace的用法
MySQL replace函数我们经常用到,下面就为您详细介绍MySQL replace函数的用法,希望对您学习MySQL replace函数方面能有所启迪 mysql replace实例说明: ...
- java项目组会议纪要
上周五项目经理开例会让我记录会议纪要,以下是我记录的纪要.给大家分享一下! 一.时间:2014年04月25日 二.地点:研发部 三.人物:xx,xx,xx 四.内容(相关项目的一些事项): 1.对待需 ...
- bootstrap固定响应式导航
<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.2.0/css/bootstrap. ...
- BZOJ 1718: [Usaco2006 Jan] Redundant Paths 分离的路径( tarjan )
tarjan求边双连通分量, 然后就是一棵树了, 可以各种乱搞... ----------------------------------------------------------------- ...