Reputation: 17651
I have seven UIViews attached to a navigation Controller - Each has an icon as below -
As there are more than 5 pages linked - the tab bar adds a more icon - which when pressed displays a sub page with the further menu options -
The sub page and the subsequent links have a nav bar - which has a blue tint color which I'd like to change to orange to match the rest of the app. My question is how do I style this as it doesn't appear in the storyboard?
Upvotes: 5
Views: 3729
Reputation: 11
You can use tabBarController.moreNavigationController.view.tintColor = UIColor(color).
Or in subclass of tabBarController just call self.view.tintColor = UIColor(Color) in viewDidLoad and it will affect more screen and edit screen.
Upvotes: 1
Reputation: 57149
UIBarButtonItem instances like those in your navigation bar take their tint color from their nearest parent view that has a tint color set. If there isn’t one, they use the default system blue. The iOS 7 UI Transition Guide describes how you can set the tint color for your whole app at once.
The Global Tint menu in the Interface Builder Document section of the File inspector lets you open the Colors window or choose a specific color.
Upvotes: 3
Reputation: 108101
You can access that view controller using the moreNavigationController
property of UITabBarController
.
As you can read in the documentation:
This property always contains a valid More navigation controller, even if a More button is not displayed on the screen. You can use the value of this property to select the More navigation controller in the tab bar interface or to compare it against the currently selected view controller.
Therefore you can do something like
self.tabBarController.moreNavigationController.navigationBar.tintColor = [UIColor orangeColor];
Upvotes: 14