0

Our branding approach has us disabling the translucency property in iOS 7 in navigation and tab bars.

With a tab bar controller, the translucency is off for all the tabs, except when we click "more". If we choose one of the options on the "more" list, and then go back, then the translucency is gone (correctly). Changing tabs is correct.

When we go to "more" the first time, we want the translucency effect to not be applied.

Steps to Reproduce: 1. Tab bar controller with more than 5 tabs. 2. Set translucency to NO. 3. Change taps when running the app. Note that the "more" tab is incorrect until one of those items is chosen.

Expected Results: The top bar for all the tabs should be similar, that the translucency effect is not applied.

Actual Results: For the "more" tab, the translucency effect is applied although we turned it off.

How do we turn off translucency for the "more" tab?

Jason Hocker
  • 6,879
  • 9
  • 46
  • 79
  • http://stackoverflow.com/questions/18929864/how-do-i-change-the-navigation-bar-color-in-ios-7/18929980#18929980 – Rajneesh071 Sep 26 '13 at 08:07

2 Answers2

3

Are you talking about the navigation bar for the More view controller where the "More" title and Edit button exist? You can get a reference to that and set the translucent property to NO separately:

UINavigationController *navBarController = self.tabBarController.moreNavigationController;
navBarController.navigationBar.translucent = NO;
  • Thanks @Ryan. I didn't stop to think about how the "more" is a navigation controller and would need to also be set. – Jason Hocker Sep 26 '13 at 13:57
  • this doesn't work each time. Once I pick an item then it continues to look good, but it doesn't look right the first time. If I uninstall the app the problem is back. Looking at the debugger the variable is set correctly but it looks translucent. – Jason Hocker Sep 26 '13 at 15:04
  • I am accepting this answer. I took away the acceptence at one point, but this is the right answer I believe. We observed that it didn't work all the time when we had it in viewDidLoad of the TabBarController. We were dynamically adding tabs, so once we moved this code to after we added the tabs, then I think its working all the time again. – Jason Hocker Sep 26 '13 at 15:15
0

I think you can use, change statusBarStyle with calling depend on your situation (UIStatusBarStyleDefault, UIStatusBarStyleLightContent etc) like this:

[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];

And after you should call this method for refresh.

[self setNeedsStatusBarAppearanceUpdate];