- (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;
}

最新文章

  1. Alpha版本十天冲刺--Day6
  2. android 生成.keystore文件
  3. c++句柄设计
  4. IE 下JS和CSS 阻塞后面内容总结
  5. Docker Resources
  6. 点击图标 标记为星标记事mac中修改默认的apache网站根目录位置
  7. [wordpress]后台自定义菜单字段和使用wordpress color picker
  8. [OpenSource]浅谈.Net和Java互相调用的三种方式
  9. linux内核学习-
  10. 【动态规划】POJ 1161 & ZOJ1463 & XMU 1033 Brackets sequence
  11. unison实时双向数据同步
  12. 大数据系列修炼-Scala课程03
  13. C#私房菜[二][提供编程效率的技巧]
  14. laravel 嵌套的渴求式加载
  15. ios访问web页面<div>点击事件不起效果,以及alert()显示url的解决办法
  16. input按钮使用方法
  17. React 系列教程
  18. [leetcode]38. Count and Say数数
  19. Python 多线程、多进程 (三)之 线程进程对比、多进程
  20. 首次使用Vue开发

热门文章

  1. python 小练习 5
  2. PostgreSQL常用查看命令
  3. [CodeForces - 197D] D - Infinite Maze
  4. hive top n
  5. 使用Swagger2构建强大的RESTful API文档(2)(二十三)
  6. Sql server中如何将表A和表B的数据合并(乘积方式)
  7. laravel的firstOrCreate的作用:先查找表,如果有就输出数据,如果没有就插入数据
  8. laravel查找某个类拥有的方法:
  9. Win10系列:VC++调用自定义组件1
  10. 一个非常适合IT团队的在线API文档、技术文档工具 (ShowDoc)