uitableview - iPhone 上默认的 TableView 部分标题背景颜色是什么?

标签 uitableview tableview

我想自定义 TableView 部分标题并保留默认背景颜色。我使用 - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger) 部分。我需要根据设备(iPad 或 iPhone)更改字体大小。为此,调用下一个函数:

[UIColor colorWithHue:0.6 饱和度:0.33 亮度:0.69 alpha:0.6]。

但我手动找到了这些值。

最佳答案

ios7 的默认 tableview 部分标题背景颜色是

Objective-C
[UIColor colorWithRed:247/255.0f green:247/255.0f blue:247/255.0f alpha:1.0f]

Swift
UIColor(red: 247/255, green: 247/255, blue: 247/255, alpha: 1)

关于uitableview - iPhone 上默认的 TableView 部分标题背景颜色是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8742493/

相关文章:

ios - 如何根据 UILabel 高度调整 UITableView 高度?

iphone - TableView :sectionForSectionIndexTitle:atIndex: for table footer/header

checkbox - 为什么我无法在表格 View 中选择复选框?

ios - 滚动 tableView 部分页脚和页眉

swift - UITableView 不会显示数组中的信息

swift - 使用可重用的 TableView 进行排序

ios - UITableViewCell标签和多行

ios - 将值从 UITableViewCell 传递到详细信息 View

ios - 滚动时 UITableView 复选标记消失

ios - 如何以编程方式展开和折叠具有动态高度的表格 View 单元格?