在我的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;
}
然而,页脚视图的颜色总是比分隔线的颜色更暗,就像这样:
我该如何使它们具有完全相同的颜色?谢谢。
lightGrayColor
,但是单元格分隔线的颜色介于“ccc”或“ddd”之间... - Pham Hoan