UIRectEdgeNone makes NavigationBar and Tabbar darker

I have an iOS 7 application that has a NavigationController inside a TabbarController. Then I adjust the background color of the bars

[[UINavigationBar appearance] setBarTintColor:[UIColor blueColor]]; [[UITabBar appearance] setBarTintColor:[UIColor blueColor]]; 

It is working fine. But if there is a ViewController that should not be covered with stripes, like this

 self.edgesForExtendedLayout = UIRectEdgeTop; 

This means that this ViewController does not want to be covered by Tabbar. But that makes the Tabbar darker than usual.

I think this is because I use my own color for the bars. How to fix?

+6
source share
2 answers

This probably means that there is nothing below the transparent tab bar. Set the translucent tab property to NO

+6
source

@rounak is right, perhaps setting the translucency of the tab or navigation bar to NO so that iOS doesn't try to put another tab or navigation bar below the current one, which makes it darker.

In viewDidLoad add the following:

 self.navigationController.navigationBar.translucent = NO; // if you have a nav self.tabBarController.tabBar.translucent = NO; // if you have a tab 
+5
source

All Articles