I know this might have been asked thousands time, I tried changing the background for my UITablewViewCell via the following:
cell.contentView.backgroundColor = [UIColor colorWithRed:0 green:0.188235 blue:0.313725 alpha:1];
cell.textLabel.backgroundColor = [UIColor colorWithRed:0 green:0.188235 blue:0.313725 alpha:1];
and all I have now is:
How do I set that accessory view background view color as well?
UPDATE: I have a section header on top in which it has a white background
Swift 3, 4, 5 select cell background colour Next connect your cell's selectedBackgroundView Outlet to this view. You can even connect multiple cells' outlets to this one view. Show activity on this post. For a solution that works (properly) with UIAppearance for iOS 7 (and higher?)
To remove any background colors, patterns, or fill effects from cells, just select the cells. Then click Home > arrow next to Fill Color, and then pick No Fill.
Put this in your UITableViewDelegate
:
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
cell.backgroundColor = [UIColor colorWithRed:0 green:0.188235 blue:0.313725 alpha:1];
}
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