2012-09-27 18 views

Respuesta

63

Es posible que necesite añadir un poco de código. Try -

[UITableView setBackgroundView: nil];

o también puede hacer:

UIView* bview = [[UIView alloc] init]; 
bview.backgroundColor = [UIColor yellowColor]; 
[tableView setBackgroundView:bview]; 

Ambos funcionarán ..

+1

El código funcionó .. –

+0

Sí. el segundo funcionará para compatibilidad con versiones anteriores también – NiKKi

+0

Cuando agrupa un UITableView, se establece el backgroundView, usando self.tableView.backgroundView = nil; lo quita – leviathan

0

Usted, además, que desactivar el fondo de la vista:

[addressNewTbl setBackgroundView:nil]; 
6

¿Usted intentó

addressNewTbl.backgroundView = nil; 
[addressNewTbl setBackgroundColor:[UIColor redColor]]; 
0

En lugar de establecer el color de fondo de toda la UITableView, trate de lo que sucede cuando establecer el color de fondo backgroundView.

-3

en la fuente de datos cellForRowAtIndexPath establecer

[cell setBackgroundColor:[UIcolor redColor]]; 
+2

OP es sobre el fondo de la tabla no el fondo de la celda .. – Maulik

Cuestiones relacionadas