要改变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的选中背景色的更多相关文章

  1. iOS开发UITableViewCell的选中时的颜色设置(转)

    iOS开发UITableViewCell的选中时的颜色设置   1.系统默认的颜色设置 //无色 cell.selectionStyle = UITableViewCellSelectionStyle ...

  2. 【转】iOS开发UITableViewCell的选中时的颜色设置

    原文网址:http://mobile.51cto.com/hot-404900.htm 1.系统默认的颜色设置 //无色 cell.selectionStyle = UITableViewCellSe ...

  3. iOS开发UITableViewCell的选中时的颜色设置

    1.系统默认的颜色设置 //无色 cell.selectionStyle = UITableViewCellSelectionStyleNone; //蓝色 cell.selectionStyle = ...

  4. iOS设置UITableViewCell的选中时的颜色

    1.系统默认的颜色设置 //无色   cell.selectionStyle = UITableViewCellSelectionStyleNone;     //蓝色   cell.selectio ...

  5. iOS 改变tableview cell的背景色

    cell.selectedBackgroundView = [[UIView alloc] initWithFrame:cell.frame]; cell.selectedBackgroundView ...

  6. [IOS 开发] 自定义(重写) UITableViewCell的高亮背景色

    IOS的sdk中,对UITableViewCell的高亮背景色只支持两种颜色,分别为UITableViewCellSelectionStyleBlue和UITableViewCellSelection ...

  7. IOS - UITableViewCell的选中时的颜色及tableViewCell的selecte与deselecte

    1.系统默认的颜色设置 [cpp] view plaincopy //无色 cell.selectionStyle = UITableViewCellSelectionStyleNone; //蓝色 ...

  8. UITableViewCell背景色.选中背景色,分割线,字体颜色设置

    1.系统默认的颜色设置 //无色 cell.selectionStyle = UITableViewCellSelectionStyleNone; //蓝色 cell.selectionStyle = ...

  9. UITableViewCell的选中时的颜色设置

    转自:http://hi.baidu.com/zhu410289616/item/0de0262910886011097508c2 1.系统默认的颜色设置 //无色 cell.selectionSty ...

随机推荐

  1. Kafka详解与总结(四)

    Kafka消息分发和消费者push.pull机制 1. 消息分发 Producer客户端负责消息的分发 kafka集群中的任何一个broker都可以向producer提供metadata信息,这些me ...

  2. linux 如何查看进程的执行时间

    ps  -ef|grep wo.php 得到 程序的pid 如 123 ps -p 123 -o etime

  3. python 生成器函数.推导式.生成器表达式

    一.生成器 什么是生成器,生成器的实质就是迭代器 在python中有三种方式来获取生成器: 1.通过生成器函数 2.通过各种推导式来实现生成器 3.通过数据的转换也可以获取生成器 1 def func ...

  4. [转]linux之top命令

    转自:http://www.cnblogs.com/ggjucheng/archive/2012/01/08/2316399.html 简介 top命令是Linux下常用的性能分析工具,能够实时显示系 ...

  5. [转]linux uniq 命令详解

    转自:http://blog.csdn.net/tianmohust/article/details/6997683 uniq 命令   文字 uniq 是LINUX命令 用途 报告或删除文件中重复的 ...

  6. Sqoop架构(四)

    Sqoop 架构是非常简单的,它主要由三个部分组成:Sqoop client.HDFS/HBase/Hive.Database. 下面是Sqoop 的架构图 (1)用户向 Sqoop 发起一个命令之后 ...

  7. Linq学习(二)-本次学习用到的资料

    本次学习用到的数据库初始化脚本如下 use KMS create table Blog_User ( UserId ,1), NickName ), CreateTime datetime ) cre ...

  8. [ SHOI 2001 ] 化工厂装箱员

    \(\\\) \(Description\) 传送带上按顺序传过来\(N\)个物品,一个有\(A,B,C\)三类. 每次装箱员手里只能至多拿十个,然后将手中三类物品中的一类装箱,才能接着拿或接着装箱, ...

  9. JS高级——函数的调用模式

    函数调用模式一共有四种 <script> //1.函数模式 //this指向window全局对象 //2.方法模式 //this指向调用这个方法的对象 //3.构造函数模式 //this ...

  10. jsessionid什么时候生成并传递到前端的?

    jsessionid什么时候生成并传递到前端的?     如果客户端请求的cookie中不包含JSESSIONID,服务端调用request.getSession()时就会生成并传递给客户端,此次响应 ...