ios - 更改空 TableView 单元格的颜色?

标签 ios uitableview

我更改了 Storyboard 中单元格的颜色(未使用任何代码),但正如您在这张图片中所见:

enter image description here

空单元格默认保持白色。我也想将那些空单元格更改为红色,但我无法弄清楚。 我也在我的代码设置 cell.backgroundColor = [UIColor redColor]; 没有成功。

最佳答案

您只需设置 tableView 的 backgroundColor: yourTableView.backgroundColor = [UIColor redColor];

关于ios - 更改空 TableView 单元格的颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23880287/

相关文章:

ios - 代码/ios : Core Data Prepare for segue error with topViewController

ios - 在 Swift 中以编程方式切换到 TableViewCell 单击上的导航 View

iphone - 编辑时隐藏一些 UITableViewCells?

ios - 当键盘隐藏屏幕的下半部分时如何滚动 UITableView

ios - 带有自定义单元格的表格 View 仍然是普通表格 View 吗?

ios - 滚动 UITableView 时随机崩溃

ios - UITableViewCell 高度不正确,直到通过滚动重新创建单元格

iphone - 使用 xCode 4.2 在 Interface Builder 中删除自动布局(约束)

ios - 为Xcode添加AppIcon(Ipad Pro应用程序图标)

ios - CFStringRef 将值设置为 ""