iosuinavigationbarnavigationbaruicolorbartintcolor

Different color shade of navigation bar in ViewController


I have embedded my view controller in a navigation controller. I set the background color of the view in my view controller to a color (#ed1c24). And I want the navigation bar also be the same color.

But setting the tint color (same #ed1c24) in the attribute inspector of the navigation controller gives different shade in the view controller as shown in the image. What would be causing this issue?

different shade in navigation bar


Solution

  • Along with setting Translucent, use the Style as Black. That would give the correct match with the colour in your view.

    enter image description here