http://blog.sina.com.cn/s/blog_6734cee201011kya.html

原因:
1.backgroundView 属性不为nil,所有设置backgroundColor 没有意义
@property(nonatomic, readwrite, retain) UIView *backgroundView __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_3_2); // the background view will be automatically resized to track the size of the table view.  this will be placed as a subview of the table view behind all cells and headers/footers.  default may be non-nil for some devices.

解决方法:
[self.tableView setBackgroundView:nil];
[self.tableView setBackgroundColor:[UIColor whiteColor]];

UITableView 如何设置背景颜色的更多相关文章

  1. Pyqt 设置 背景颜色和背景图片、 QPalette 调色板 与QPainter 画板区别 、 不规则图片

    设置 背景颜色和背景图片 首先设置autoFillBackground属性为真然后定义一个QPalette对象设置QPalette对象的背景属性(颜色或图片)最后设置QWidget对象的Palette ...

  2. Aspose.Cells 设置背景颜色

    很多小伙伴设置背景颜色都不起作用,特别提醒需要加入下面一行: style.Pattern = BackgroundType.Solid; Aspose.Cells.Style style = null ...

  3. intellij IDEA15 设置背景颜色

    File--> Settings 2. Appearance & Behavior --> Appearance 设置边框背景颜色 3. Editor --> Colors ...

  4. codeblock 设置背景颜色

    今天觉得codeblock看着刺眼,想了想,能不能跟vs利用dark背景一样可以设置一个舒服的背景.于是就开始各种点击,各种摸索了. 1. 背景和各种颜色设置 不妨先说下vs中的设置是:工具(Tool ...

  5. 怎么给button设置背景颜色?【Android】

    怎么给button设置背景颜色?[Android] 怎么给button设置背景颜色?[Android] 现在我想给按钮添加背景颜色,怎么做 1.android:background="@an ...

  6. cell设置背景颜色为啥不起作用

    利用poi设置背景颜色时,应如下配置, CellStyle cell=workbook.createCellStyle(); cell.setFillForegroundColor(IndexedCo ...

  7. IDEA 设置背景颜色及字号

    intellij IDEA 设置背景颜色   File--> Settings 2. Appearance & Behavior --> Appearance 设置边框背景颜色 3 ...

  8. qt webengineview 设置背景颜色

    当使用qwebengineview加载网页的使用,可以通过网页端的css设置网页的显示效果 但是当窗口大小改变的时候,你会发现网页的resize速度赶不上窗口的resize速度,这是会出现白色空白,而 ...

  9. iOS 7 UITableview 在Plain模式下 设置背景颜色无效

    在iOS6的时候,设置Plain模式下table的颜色 通过[self.table setBackgroundColor:[UIColor red]]; 就可以看到一个满身通红的tableView 但 ...

随机推荐

  1. Wrong codepoints for non-ASCII characters inserted in UTF-8 database using CLP

    Technote (troubleshooting) Problem(Abstract) During insert from the CLP there is no codepage convers ...

  2. system.web下的HttpModules节点和system.webServer下的modules节点的配置区别

    [转]自定义HttpModule的一些经验--配置篇 自定义web模块,需继承System.Web.IHttpModule接口 一:拦截对该服务器所有的http请求. 第一步:将自定义module类使 ...

  3. C# 获取Image图片格式

    private void button1_Click_1(object sender, EventArgs e) { string path = Application.StartupPath; us ...

  4. linux升级php至5.6

    1 查看终端当前php版本 php -v 会反馈以下信息: PHP 5.4.35 (cli) (built: Nov 14 2014 07:04:10) Copyright (c) 1997-2014 ...

  5. jmm 和线程安全

    Java的内存模型JMM Java的内存模型JMM(Java Memory Model)JMM主要是为了规定了线程和内存之间的一些关系.根据JMM的设计,系统存在一个主内存(Main Memory), ...

  6. [Learn AF3]第三章 App Framework 3组件之Panel:afui的核心

    Panel,afui的核心组件 组件名称:Panel     使用说明:按照官方的说法,panel组件是af3的“核心(heart of the ui)”,panel用于构造应用中独立的内容展示区域, ...

  7. curl tutorial with examples of usage

    原文:http://www.yilmazhuseyin.com/blog/dev/curl-tutorial-examples-usage/ 阮一峰的这个教程也不错:http://www.ruanyi ...

  8. koa中上传文件到阿里云oss实现点击在线预览和下载

    比较好的在线预览的方法: 跳转一个新的页面,里面放一个iframe标签,或者object标签 <iframe src="xxx"></iframe> < ...

  9. vue-router 2 跳转失败原因

    axios.post('/internal/user/login_from_mobile ',{ mobile: this.logPrefix+this.formInline1.mobile, pas ...

  10. 快速排查SQL服务器阻塞语句

    SELECT*FROM sys.sysprocesses and blocked> --可以查看阻塞 SELECT SPID=p.spid, DBName =convert(CHAR(),d.n ...