iOS:改变UITableViewCell的选中背景色
要改变UITableViewCell选中时的背景色,需要在
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)方法中添加如下代码:
// 设置cell选中的背景色
UIView *selectionColor = [[UIView alloc] init];
selectionColor.backgroundColor = [UIColor colorWithRed:(/255.0)
green:(/255.0)
blue:(/255.0)
alpha:];
cell.selectedBackgroundView = selectionColor;
即可。
iOS:改变UITableViewCell的选中背景色的更多相关文章
- iOS开发UITableViewCell的选中时的颜色设置(转)
iOS开发UITableViewCell的选中时的颜色设置 1.系统默认的颜色设置 //无色 cell.selectionStyle = UITableViewCellSelectionStyle ...
- 【转】iOS开发UITableViewCell的选中时的颜色设置
原文网址:http://mobile.51cto.com/hot-404900.htm 1.系统默认的颜色设置 //无色 cell.selectionStyle = UITableViewCellSe ...
- iOS开发UITableViewCell的选中时的颜色设置
1.系统默认的颜色设置 //无色 cell.selectionStyle = UITableViewCellSelectionStyleNone; //蓝色 cell.selectionStyle = ...
- iOS设置UITableViewCell的选中时的颜色
1.系统默认的颜色设置 //无色 cell.selectionStyle = UITableViewCellSelectionStyleNone; //蓝色 cell.selectio ...
- iOS 改变tableview cell的背景色
cell.selectedBackgroundView = [[UIView alloc] initWithFrame:cell.frame]; cell.selectedBackgroundView ...
- [IOS 开发] 自定义(重写) UITableViewCell的高亮背景色
IOS的sdk中,对UITableViewCell的高亮背景色只支持两种颜色,分别为UITableViewCellSelectionStyleBlue和UITableViewCellSelection ...
- IOS - UITableViewCell的选中时的颜色及tableViewCell的selecte与deselecte
1.系统默认的颜色设置 [cpp] view plaincopy //无色 cell.selectionStyle = UITableViewCellSelectionStyleNone; //蓝色 ...
- UITableViewCell背景色.选中背景色,分割线,字体颜色设置
1.系统默认的颜色设置 //无色 cell.selectionStyle = UITableViewCellSelectionStyleNone; //蓝色 cell.selectionStyle = ...
- UITableViewCell的选中时的颜色设置
转自:http://hi.baidu.com/zhu410289616/item/0de0262910886011097508c2 1.系统默认的颜色设置 //无色 cell.selectionSty ...
随机推荐
- JavaScript--如何插入JS
我们来看看如何写入JS代码?你只需一步操作,使用<script>标签在HTML网页中插入JavaScript代码.注意, <script>标签要成对出现,并把JavaScrip ...
- 如何解决error LNK2001(转载)
转自:http://www.cnblogs.com/myzhijie/articles/1658545.html 解决外部符号错误:_main,_WinMain@16,__beginthreadex ...
- CSS——float
float:就是在于布局,首先要介绍的是文档流(标准流),之后是浮动布局. 文档流:元素自上而下,自左而右,块元素独占一行,行内元素在一行上显示,碰到父集元素的边框换行. 浮动布局: 1.float: ...
- [Windows Server 2008] 安装IIS7.5及FTP
★ 欢迎来到[护卫神·V课堂],网站地址:http://v.huweishen.com★ 护卫神·V课堂 是护卫神旗下专业提供服务器教学视频的网站,每周更新视频.★ 本节我们将带领大家:安装IISII ...
- angular 零碎
相关链接 api(需要FQ) ui-router 知乎 作用域 angular 中作用域的概念是一个亮点,由不同的指令.controller等作用域组成的作用域树就是一个app.简单理解一个contr ...
- iframe监听unload事件
阻止默认事件 event.preventDefault(); 阻止事件冒泡 event.stopPropagation(); event.cancelBubble = true; //IE <a ...
- RTL Compiler之synthesis flow
1 generic RTL Compiler work flow 2 invoking RTL compiler RTL Compiler is invoked from the operating ...
- pptp服务故障
pptp服务故障记录 原文地址:http://www.cnblogs.com/caoguo/p/4994512.html 1.pptp部署是遇到开了防火墙端口不能拨号,拨号是提示错误如下: 但是关闭防 ...
- https Full Handshake
1)加密套件交互: 2)密码交换: 3)身份认证: Full Handshake Initially, client and server "agree upon" null en ...
- vi 命令学习(三)
[末行命令] 末行命令主要是针对文件进行操作的:保存.退出.保存&退出.搜索&替换.另存.新建.浏览文件 命令 ...