cell设置背景色
来源:互联网 发布:rpk文件在线打开软件 编辑:程序博客网 时间:2024/04/28 07:15
貌似是这样的
cell.backgroundColor = [UIColor xxxColor];
但是有个问题,cell的背景不是直接设置的,而是以第一个cell的背景颜色为基础,所以要修改第一个cell的背景颜色。
int backgoudViewIndex = 8888;
[[cell.subviews objectAtIndex:0]setTag:backgoudViewIndex];
NSInteger row1=[indexPath row];
UIView*backgoudView=[cell viewWithTag:backgoudViewIndex];
if(0==(row1%2))
{
backgoudView.backgroundColor = [UIColor whiteColor];
}
else
{
backgoudView.backgroundColor = [UIColor colorWithRed:239.0/255.0 green:241.0/255.0 blue:245.0/255.0 alpha:1];
}
- cell设置背景色
- 设置 cell 的背景色,背景图 ,选中效果
- storybord 中设置collectionView中cell的背景色无效
- cell选中的背景色
- 设置标题栏背景色,背景色是自定义背景色
- 设置背景色
- 设置对话框背景色
- 设置状态栏背景色
- OPENGL 设置背景色
- 设置Eclipse背景色
- notepad++设置背景色
- SecureCRT设置背景色
- 设置对话框背景色
- 网页背景色设置
- Android背景色设置
- Eclipse 设置背景色
- 设置webview背景色
- 设置IE背景色
- 电脑开机到操作系统开始启动过程描述
- 网件WNR2200路由器openwrt固件正式版
- Android sqlite约束-视图-检查
- 安装在ubuntu12.04上安装gcc4.8
- 常用软件
- cell设置背景色
- 从汇编看C++中的指针和引用
- Html5 学习系列(三)增强型表单标签
- QGIS噱头笔记--(1)QGIS概要了解
- 盘点黑客攻击途径:最常用的7个策略及简单的防护方法
- LLC算法学习
- 宇龙酷派面试 2014 武汉
- 写给Linux内核新手-关于Linux内核学习的误区
- Sql Server常见错误