取消UITableViewCell的背景色
//无色
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的背景色的更多相关文章
- iOS工作笔记(十三)
1.automaticallyAdjustsScrollViewInsets的使用 这是UIViewController的属性,设置为YES就是根据status bar,navigation bar, ...
- Android开发系列(十六):【Android小游戏成语连连看】第二篇
写的晚了,在分工个Z市高中的一个成绩查询的系统,原系统居然是用VB写的,我不得不佩服原本写系统的那位哥们真能耐得住. 明天搭建下SVN就等着先发project款然后開始项目了.想想有工资进账,心里也为 ...
- [IOS 开发] 自定义(重写) UITableViewCell的高亮背景色
IOS的sdk中,对UITableViewCell的高亮背景色只支持两种颜色,分别为UITableViewCellSelectionStyleBlue和UITableViewCellSelection ...
- iOS uitableViewCell 选中 push后返回 取消选中状态
首先我有一个UITableViewController,其中每个UITableViewCell点击后都会push另一个 ViewController,每次点击Cell的时候,Cell都会被选中,当从p ...
- iOS:改变UITableViewCell的选中背景色
要改变UITableViewCell选中时的背景色,需要在-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtInde ...
- UITableViewCell背景色.选中背景色,分割线,字体颜色设置
1.系统默认的颜色设置 //无色 cell.selectionStyle = UITableViewCellSelectionStyleNone; //蓝色 cell.selectionStyle = ...
- Android中取消GridView & ListView默认的点击背景色
方法一: gridView.setSelector(new ColorDrawable(Color.TRANSPARENT)); listView.setSelector(new ColorDrawa ...
- Qt setStyleSheet 添加背景色/背景图片(取消背景色,读取本地文件作为背景色)
容易搞定,mainWindow 是一个QWidget.// 设置背景色为蓝色mainWindow.setStyleSheet("background-color:blue;"); ...
- 【ztree】zTree取消树节点选中的背景色
点击树节点的时候是ztree给树加了个class: curSelectedNode 所以最简单的清除树节点的背景色的方法是移除其有背景色的class: $(".curSelectedN ...
随机推荐
- SpringBoot与Dubbo整合-项目搭建
本章节建立生产者和消费者来演示dubbo的demo 生产者:springboot-dubbo-provider 和 消费者:springboot-dubbo-consumer 工程配置详解 Apach ...
- Css盒模型有哪几部分,标准盒模型和IE盒模型有哪些区别
首先介绍Css的盒模型也就是标准盒模型(BOX Model) 包含了 内容(content) 内边距(padding) 边框(border) 外边框(margin) 这是大家经常用到的,也是现在的标准 ...
- Inversion of Control Containers and the Dependency Injection pattern--Martin Fowler
原文地址:https://martinfowler.com/articles/injection.html n the Java community there's been a rush of li ...
- Centos7.0 Vmware10.0.3 网络桥接配置
首先要将Vmware10.0.3设置为桥接模式. CentOS 7.0默认安装好之后是没有自动开启网络连接的! cd /etc/sysconfig/network-scripts/ #进入网络配置 ...
- mktemp---创建暂存文件
- 【MinGW】【C语言环境搭建】
问题 安装MinGW配置环境变量后终端输入gcc -v出错 解决 Win10下环境变量最后不用加分号
- js08--函数1
函数当成类看当成匿名对象看,都是跟java吻合的,只有当成函数看(函数自己可以执行)跟java区别在这里. function fact(){} var F = fact ; 函数名是函数对象的地址,是 ...
- Android开发经验小知识点
<1> 设置屏幕无标题栏 在AndroidManifest.xml设置: Android:theme="@android:style/Theme.NoTitleBar"
- thinkphp缓存使用
thinkphp缓存使用 一.总结 1.这里的缓存不是指的缓存的页面,而是cache,如果你缓存了一个数组,那么你就可以取出这个数组里面的数据进行使用,用法性质和cookie和session有点像 2 ...
- c#操作ElasticSearch5详解
c#操作ElasticSearch详解 ElasticSearch系列学习 ElasticSearch第一步-环境配置 ElasticSearch第二步-CRUD之Sense ElasticSearc ...