I am unable to change the background color of static UITableViewCells on iOS 7, when running on iPad device. You can easily check this with following setup:
According to Apple's doc:
Whether you use a predefined or custom cell, you can change the cell’s background using the
backgroundView
property or by changing the inheritedbackgroundColor
property. In iOS 7, cells have a white background by default; in earlier versions of iOS, cells inherit the background color of the enclosing table view. If you want to change the background color of a cell, do so in thetableView:willDisplayCell:forRowAtIndexPath:
method of your table view delegate.
So no matter what color you set in tableView:cellForRowAtIndexPath:
, iOS 7 changes it to white later. Just set it in tableView:willDisplayCell:forRowAtIndexPath:
. Worked for me perfectly.