开发者

TableView Cell Color

开发者 https://www.devze.com 2023-01-12 06:47 出处:网络
我现在遇到了个问题,如何使uitab开发者_运维知识库leview cell 的背景色填满整个cell ,以下是我的代码。但它不能正常工作、、、
我现在遇到了个问题,如何使uitab开发者_运维知识库leview cell 的背景色填满整个cell ,以下是我的代码。但它不能正常工作、、、

Picture shows:

TableView Cell Color

How can I code that set the color fill in cell view?

My code is below, but it does not work well.

cell.contentView.backgroundColor =[UIColor groupTableViewBackgroundColor];
cell.backgroundColor=[UIColor groupTableViewBackgroundColor];
cell.backgroundView.backgroundColor =[UIColor groupTableViewBackgroundColor];
cell.textLabel.backgroundColor = [UIColor groupTableViewBackgroundColor];
cell.detailTextLabel.backgroundColor = [UIColor groupTableViewBackgroundColor];


it works!

  • (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { [tableView setBackgroundColor:[UIColor groupTableViewBackgroundColor]]; return 1; }
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号