-1

I have a headerView for a cell and a cell containing a collectionView. I wish to make both have a background color of

UIColor(red: 0.898, green: 0.898, blue: 0.898, alpha: 1.0)

I set both headerView's background color and the cell and its collectionView's background color with the color above. However, when I run the code, I get a little contrast in color between the headerView and the tableView cell. I'm not sure why. I used the same UIColor.

enter image description here

You can see the subtle difference.

1 Answers1

0

You also need to check out cell contentView, cells and its content views for your collection view.

If this still doesn't help, try examining the view hierarchy to check which view background wasn't changed.

Phil Dukhov
  • 67,741
  • 15
  • 184
  • 220
  • 1
    Yes, the problem was that I was setting the cell's background's color. What I needed to do was set the cell's content view's background color instead. – infiniteObj Aug 06 '21 at 03:09