TableView单元格颜色
-
29-09-2019 - |
题
我现在遇到了个问题,如何使uitableview cell 的背景色填满整个cell ,以下是我的代码。但它不能正常工作、、、
图片显示:
如何编码将颜色填充在单元格视图中?
我的代码在下面,但运行不佳。
cell.contentView.backgroundColor =[UIColor groupTableViewBackgroundColor];
cell.backgroundColor=[UIColor groupTableViewBackgroundColor];
cell.backgroundView.backgroundColor =[UIColor groupTableViewBackgroundColor];
cell.textLabel.backgroundColor = [UIColor groupTableViewBackgroundColor];
cell.detailTextLabel.backgroundColor = [UIColor groupTableViewBackgroundColor];
解决方案
有用!
- (nsinteger)numberSofsectionsIntableView:(uitableView *)tableView {[[tableView sidbackgroundColor:[uicolor grouptableviewbackgackgroundColorcolor color]];返回1; }
不隶属于 StackOverflow