TableView celda de color
-
29-09-2019 - |
Pregunta
我现在遇到了个问题,如何使uitableview cell 的背景色填满整个cell ,以下是我的代码。但它不能正常工作、、、
muestra la imagen:
¿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];
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