Tom
Tom

Reputation: 543

Matching UITableView and UIViewController background colours

I have a UITableView in a UIViewController. I'm trying to set both backgrounds to the same colour but despite both background having identical RGB values, they end up displaying a slight mismatch - see image below.

enter image description here

I have tried setting the UITableView background colour to clear as well but this has no effect either.

Any ideas why this might be occurring?

Upvotes: 0

Views: 43

Answers (1)

Harish
Harish

Reputation: 2512

Make sure to set the background color of tableView like below

enter image description here

I would also recommend you to debug via Debug View Hierarchy in XCode to see which view has what color.

enter image description here

Upvotes: 1

Related Questions