I am trying to create a table with an image as a background. To do this, I started with the background:
self.view.backgroundColor = [UIColor groupTableViewBackgroundColor];
The result is a background image that also appears in the table cells. This is not what I want, so I tried setting the backgroundColor cell:
cell.backgroundColor = [UIColor whiteColor];
It had no effect !!! Hmm, strange. So I tried this:
UIView *backgroundView = [[UIView alloc] init];
backgroundView.backgroundColor = [UIColor whiteColor];
cell.backgroundView = backgroundView;
[backgroundView release];
It almost works. The only problem that remains is that textLabel and detailTextLabel still display the background behind them. Setting backgroundColor on these labels to white also does nothing.
How do I proceed? Where am I mistaken? I am trying to achieve a tableView as a worldClock application.
source
share