【发布时间】:2015-04-08 05:35:32
【问题描述】:
在我的 UITableView 中,我这样设置分隔符颜色:
- (void)viewDidLoad {
...
self.tableView.separatorColor = [UIColor lightGrayColor];
...
}
我这样设置页脚的颜色:
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
UITableViewHeaderFooterView *footerView = [[UITableViewHeaderFooterView alloc]
initWithFrame:(CGRect){0, 0, 320, 1}];
footerView.contentView.backgroundColor = [UIColor lightGrayColor];
return footerView;
}
但是,页脚视图的颜色总是比分隔符的颜色深,如下所示:
如何让它们的颜色完全相同?谢谢。
【问题讨论】:
-
不是 footerView 分隔符比表格分隔符暗。它的 table 分隔符比 footerView 轻。 TBH,您的页脚分隔符为
lightGrayColor,但单元格分隔符介于“ccc”或“ddd”之间... -
@PhamHoan 但是我在 viewDidLoad 中明确地将分隔符的颜色设置为浅灰色。
标签: ios objective-c uitableview