ios UITableView背景图片设置
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue2 reuseIdentifier:nil]; // 设置cell右边指示器的类型
if (indexPath.row % == ) {
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
} cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;
cell.accessoryView = [[UISwitch alloc] init]; // 设置背景(背景view不用设置尺寸, backgroundView的优先级 > backgroundColor)
UIImageView *bgView = [[UIImageView alloc] init];
bgView.image = [UIImage imageNamed:@"buttondelete"];
// bgView.backgroundColor = [UIColor redColor];
cell.backgroundView = bgView; UIView *selectedbgView = [[UIView alloc] init];
selectedbgView.backgroundColor = [UIColor greenColor];
cell.selectedBackgroundView = selectedbgView;
return cell;
}
ios UITableView背景图片设置的更多相关文章
- Android TextView背景颜色与背景图片设置
Android TextView 背景颜色与背景图片设置,android textview 控件,android textview 背景, android textview 图片,android te ...
- JAVA GUI学习 - 窗体背景图片设置方法:重写paintComponent(Graphics g)方法
public class BackgroundImage extends JFrame { public BackgroundImage() { this.setTitle("窗体背景图片设 ...
- css样式背景图片设置缩放
一.背景颜色图片平铺 background-color 背景颜色 background-image 背景图片地址 background-repeat 是否平铺 默认是平铺 background-pos ...
- UIView UITableView 背景图片添加
这几天,经常用到为某个视图设置背景图片,而API中UIView没有设置背景图片的方法,搜集归纳如下: 第一种方法: 利用的UIView的设置背景颜色方法,用图片做图案颜色,然后传给背景颜色. UICo ...
- 【CSS】css网页背景图片设置
刚学CSS,了解了下网页背景图设置,顺便记录下. 下面主要是实现背景图位置保持不变,即不随滚动条动而动的功能. body { background-image:url(images/bck.png); ...
- TextView字体和背景图片 设置透明度
背景图片透明度设置 viewHolder.relative_layout.getBackground().setAlpha(225); 0 --- 225 ((TextView)tv). ...
- WPF Button的背景图片设置
这个问题很简单,但是对于从winfrom转过来的来讲,在做事的时候就会被绕进去,言归正传,如何设置一个bUtton的背景图片?如何去掉让人烦的默认选中时的灰色背景?请看如下的描述.问题的来源和解决都在 ...
- QT:给Widget设置背景图片——设置Widget的调色板,调色板使用图片和背景色
QT:给Widget设置背景图片 1 /*2 * set background image3 */4 QPixmap bgImages(":/images/bg.png");5 Q ...
- MFC 窗体背景图片设置
很多人在做MFC 界面的时候想要给对话框加入背景图片,很多人都会想到在OnPaint()里面来加一段代码来实现,其实这样做并不怎么科学,因为它会导致窗口不断重绘,在很多项目中窗口会闪烁(比如带播放视频 ...
随机推荐
- day1-6 字符串、列表、元组、字典、类型转换
day1 1.python历史. 宏观上:python2 与 python3 区别: python2 源码不标准,混乱,重复代码太多, python3 统一 标准,去除重复代码. 2.python的环 ...
- 模拟spring的IoC
1.新建一个web项目,jdk版本为1.8.0_111,使用 Jsp + Servlet + Model 实现MVC模式,并使用BeanFactory工厂 + xml配置文件 + 反射 来解耦合 整个 ...
- html5 meta标签的认知储备
在开发移动或者PC端的时候除了'<meta charset="UTF-8">'这个设置编码格式的meta标签,还有一些其他方面的设置 一.<meta name=& ...
- Web Services的学习一
1.Web Services可以将应用程序转换成为网络应用程序,也就是说可以通过Web Services,应用程序可以向全世界发布信息,或者提供功能. 而且通过Web Services发布的,可以被其 ...
- java高级---->Serializable的过程分析
本次讲解中我们在上次的基础上,深入的了解一下序列化的流程以及其中的原理.关于序列化的一些知识与使用,请参见我的另一篇博客:java基础---->Serializable的使用.好了,我们进行以下 ...
- hearbeat of RAC
Heartbeat is a pooling mechanism in clustered platforms to verify if the other server participating ...
- 一个典型的多表参与连接的复杂SQL调优(SQL TUNING)引发的思考
今天在看崔华老师所著SQL优化一书时,看到他解决SQL性能问题的一个案例,崔华老师成功定位问题并进行了解决.这里,在崔华老师分析定位的基础上,做进一步分析和推理,以便大家一起研究探讨,下面简述该案例场 ...
- Weblogic禁用SSLv3和RC4算法教程
weblogic在启用https时一样会报同WebSphere那样的一SSL类漏洞,中间件修复这些漏洞原理上来说是一样的,只是在具体操作上有着较大的区别. 1. weblogic禁用SSLv3算法 编 ...
- MySQL变量变更小记
MySQL会随版本的更新,在新版本中淘汰一些variable和引入一些新的variable.在配置variable后不起作用或安全扫描取不到variable值产生告警时,可能正是variable变更的 ...
- python(2)之列表
列表的使用 names=["zhangyang","liming",["sese","popo"],"xiao ...