Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS 7 NavigationBar not showing exact RGB color

I set a special color for my Nav Bar in the AppDelegate:

[[UINavigationBar appearance]setBarTintColor:[UIColor colorWithRed:0 green:(41.0f/255.0f) blue:(103.0f/255.0f) alpha:1]];

But the RGB Value which is then displayed is: R:12 G:48 B:110. It seems that iOS just puts the values a bit higher. How can I avoid that? (Because it looks ugly) And when I give the same color an customized TableViewSection it is right.

Screenshots:

NavBar: Navigation Bar

Customized TableViewSection: enter image description here

like image 369
gallileo Avatar asked Nov 16 '13 16:11

gallileo


2 Answers

Ok they were translucent. Unchecked translucent in StoryBoard, works fine now;)

like image 139
gallileo Avatar answered Oct 17 '22 01:10

gallileo


Try adding this to your AppDelegate:

[[UINavigationBar appearance] setTranslucent:NO];
like image 28
Nazarii Stadnytskyi Avatar answered Oct 17 '22 00:10

Nazarii Stadnytskyi