Цвет ячейки TableView - PullRequest
       7

Цвет ячейки TableView

1 голос
/ 16 августа 2010
我现在遇到了个问题,如何使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];

1 Ответ

0 голосов
/ 17 августа 2010

это работает!

  • (NSInteger) numberOfSectionsInTableView: (UITableView *) tableView {[tableView setBackgroundColor: [UIColor groupTableViewBackgroundColor]];возврат 1;}
...