Reputation: 41
So I am using the textLabel and detailTextLabel to add information onto my TableView cells however there is an issue.
There is a white box around both of the labels and I tried setting their backgroundColor to clearColor but that doesn't seem to work.
Any suggestions?
Upvotes: 0
Views: 289
Reputation: 33602
By default, UITableView sets the label background colour to the table view background colour. This is presumably for optimization (it lets the label be "opaque", so no alpha blending is needed when compositing).=
There are two main fixes to this problem:
nil
is generally equivalent to [UIColor clearColor]
.)-[UITableViewCell setSelected:animated]
and backgroundColor
and opaque
as above. This works because setSelected:animated: is called before the cell is first displayed, but is a bit ickier (it's called a lot).Upvotes: 1