StuStirling
StuStirling

Reputation: 16191

Setting a Storyboard Tab Controller, More Tab's Navigation Bar Colour

So throughout my application I implement Navigation Bars with the style Black Opaque.

The Problem

I can't seem to set the colour of the Navigation Bar that presents itself when the user selects the automatically generated More Tab

The Question

How do I set the colour of this Navigation Bar to Black Opaque?

Thanks in advance.

Upvotes: 0

Views: 693

Answers (1)

StuStirling
StuStirling

Reputation: 16191

Yes, I'm one of those sad people who is now answering their own question :P Hopefully it helps..

So you need to get a reference to the TabBarController in your app delegate and then change the style of the more navigation controller from there. The code below shows you how and where..

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    // Override point for customization after application launch.
    UITabBarController *_tabController = (UITabBarController*)_window.rootViewController;
    _tabController.moreNavigationController.navigationBar.barStyle = UIBarStyleBlackOpaque;
    return YES;
}

Upvotes: 1

Related Questions