//无色
cell.selectionStyle = UITableViewCellSelectionStyleNone;
//蓝色,也就是系统默认的颜色
cell.selectionStyle = UITableViewCellSelectionStyleBlue;
//灰色
cell.selectionStyle = UITableViewCellSelectionStyleGrap; //自定义选中的背景色 通过RGB来定义颜色
UIColor* color = [[UIColor alloc]initWithRed:0.0 green:0.0 blue:0.0 alpha:];
cell.selectedBackgroundView = [[UIView alloc]initWithFrame:cell.frame]autorelease];
cell.selectedBackgroundView.backgroundColor = [UIColor redColor]; //自定义选中后的背景图片
cell.selectedBackgroundView = [[[UIImageView alloc]initWithImage:
[UIImage imageNamed:@"image.png"]]autorelease];
//设置UITableViewCell中的字体颜色时用
cell.textLabel.highlightedTextColor = [UIColor **color];

取消UITableViewCell的背景色的更多相关文章

  1. iOS工作笔记(十三)

    1.automaticallyAdjustsScrollViewInsets的使用 这是UIViewController的属性,设置为YES就是根据status bar,navigation bar, ...

  2. Android开发系列(十六):【Android小游戏成语连连看】第二篇

    写的晚了,在分工个Z市高中的一个成绩查询的系统,原系统居然是用VB写的,我不得不佩服原本写系统的那位哥们真能耐得住. 明天搭建下SVN就等着先发project款然后開始项目了.想想有工资进账,心里也为 ...

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

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

  4. iOS uitableViewCell 选中 push后返回 取消选中状态

    首先我有一个UITableViewController,其中每个UITableViewCell点击后都会push另一个 ViewController,每次点击Cell的时候,Cell都会被选中,当从p ...

  5. iOS:改变UITableViewCell的选中背景色

    要改变UITableViewCell选中时的背景色,需要在-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtInde ...

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

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

  7. Android中取消GridView & ListView默认的点击背景色

    方法一: gridView.setSelector(new ColorDrawable(Color.TRANSPARENT)); listView.setSelector(new ColorDrawa ...

  8. Qt setStyleSheet 添加背景色/背景图片(取消背景色,读取本地文件作为背景色)

    容易搞定,mainWindow 是一个QWidget.// 设置背景色为蓝色mainWindow.setStyleSheet("background-color:blue;"); ...

  9. 【ztree】zTree取消树节点选中的背景色

    点击树节点的时候是ztree给树加了个class:    curSelectedNode 所以最简单的清除树节点的背景色的方法是移除其有背景色的class: $(".curSelectedN ...

随机推荐

  1. 79.QT解决迷宫问题(面向过程与面向对象)

    面向过程: 创建一个类继承dialog,mydialog,添加两个变量 #ifndef MYDIALOG_H #define MYDIALOG_H #include <QDialog>&g ...

  2. 分享一个表格插入和删除编辑功能用jQuery实现

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  3. Ansible学习记录三:配置文件

    0.配置文件 两个核心文件:ansible.cfg和hosts文件,默认都存放在/etc/ansible目录下. ansible.cfg:主要设置一些ansible初始化的信息,比如日志存放路径.模块 ...

  4. 源码安装 ipython

    https://blog.csdn.net/huobanjishijian/article/details/51470898

  5. FreeModbus RTU slave & Modbus RTU master

    一.FreeModbus RTU 协议数据格式 FreeModbus RTU是开源的一个协议,并且使用FreeModbus RTU 只能当做从机Slave,RTU协议中的指令由地址码(一个字节),功能 ...

  6. netstat -p 显示 -

    http://4735839.blog.51cto.com/4725839/1418945 https://yq.aliyun.com/articles/63060

  7. js中对数组的操作-------Day49

    今天碰到了一个问题:easyui的使用中,datagrid表格的高度怎样改变(设定成一个固定的高度),看了半天文档,也从网上查了些.还楞是没弄出来,有点小郁闷.这easyui在某些情况情况下确实好用了 ...

  8. open阶段的一致性检验(二)

    SQL> select * from v$version where rownum=1; BANNER --------------------------------------------- ...

  9. android抓取各种log的方法

    1.logcat (四类log buffer是main,radio.system.events) adb wait-for-device logcat adb logcat -v time > ...

  10. scroll- 滑动条风格调整

    <item name="scrollbarFadeDuration">250</item> <item name="scrollbarDef ...