mattti mattti - 1 year ago 84
iOS Question

Static UITableViewCell backgroundColor always white on iPad

In my project, I have a static TableView. I changed the backgroundColor of the cells in interface builder. This shows correctly on iPhone.

However, on iPad the cells background is always white.

I found a solution for dynamic cells here, but as it is using the UITableViewDataSource protocol, i can't use it with my static table.

How could I solve this problem?

Answer Source

You should set the cell.contentView.backgroundColor, as @SandeepAggarwal has pointed out.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download