Reputation: 5078
I've successfully changed the background of table view cells to an image in my app but it does not extend to the background of the accessory view. Any idea to fix this ?
Thx for helping,
Stephane
Upvotes: 1
Views: 533
Reputation: 7778
This is an old thread, that I found most helpful. What worked for me though, was to set the cell color in IB (the cell was a prototype):
Upvotes: 0
Reputation: 615
You can use the tableView:willDisplayCell:forRowAtIndexPath:
delegate function of tableview. Give background color to the cell in that function. It will give the color to accessary view background also.
Upvotes: 1
Reputation: 1240
cell.textLabel.backgroundColor = [UIColor clearColor];
cell.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"bg-Cell-Image.jpg"]];
try this way if you are using text label of the cell only to display content
Upvotes: 3