Pregunta

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

muestra la imagen:

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

¿Cómo puedo código que establece el color de relleno a la vista de la célula?

Mi código está por debajo, pero no funciona bien.

cell.contentView.backgroundColor =[UIColor groupTableViewBackgroundColor];
cell.backgroundColor=[UIColor groupTableViewBackgroundColor];
cell.backgroundView.backgroundColor =[UIColor groupTableViewBackgroundColor];
cell.textLabel.backgroundColor = [UIColor groupTableViewBackgroundColor];
cell.detailTextLabel.backgroundColor = [UIColor groupTableViewBackgroundColor];
¿Fue útil?

Solución

Así funciona!

  • (NSInteger) numberOfSectionsInTableView: (UITableView *) tableView { [TableView setBackgroundColor: [UIColor groupTableViewBackgroundColor]]; volver 1; }
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top