我现在遇到了个问题,如何使uitableview cell 的背景色填满整个cell ,以下是我的代码。但它不能正常工作、、、

图片显示:

http://www.flickr.com/photos/53054715@N05/4898445104/

如何编码将颜色填充在单元格视图中?

我的代码在下面,但运行不佳。

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; }
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top