I have a UITableView with a custom background image set like this:
self.tableView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"mybg.png"]];
The background appears fine, but my UITableViewCells (default cells, not custom) have some sort of weird tint to them, and the UILabel containing the "New Project" text also seems to have some sort of background behind it. How can I remove this? I've already tried:
cell.backgroundColor = [UIColor clearColor];
cell.textLabel.backgroundColor = [UIColor clearColor];
Thanks
alt text http://cl.ly/Cg5/content
I believe that this is a nasty side-effect of simply adding an image straight into your table view's backgroundColor.
Try adding the image to the view's background color:
[[self view] setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"mybg.png"]]];
and then set the table view's backgroundColor to be clear:
[[self tableView] setBackgroundColor:[UIColor clearColor]];
I hope this helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With