views:

26

answers:

1

I have a UITableView which displays about 5 cells at a time, yet in my table there might be cases where there are only 2 cells with content as seen on this picture:

alt text

The white cells below do not look nice, how can I change the background color of these cells to black too? UITableView does not have a backgroundColor property.

Thanks!

+2  A: 

A UITableView inherits from UIView, and UIView always has a backgroundColor.

You can also change the background color to "non-opaque", and then change the background color of your parent container.

tableView.backgroundColor = // some UIColor
Pindatjuh
I am sorry, my bad, I misspelled the name of the table... Surely an array does not have a backgroundColor attribute :) Thanks!
Robin