Joe Green
Joe Green

Reputation: 1

How to change the colour of the icons that appear in the list items in the moreNavigationController

I have an iOS application which has many views controlled by a main TabBarViewController.

When there are too many items in the tab bar, a "more" button is automatically added and the rest of the items are added to a list. In this list, the icons are blue by default, which clashes with my main theme colour. How can this be changed? The icons are only blue in iOS8, in iOS7 they are grey, which would also be acceptable if I can't specifically pick a tint.

The icons on the tab bar are correctly tinted, it's only when they appear inside the moreNavigationViewController.

I'm writing in Swift. Seems like such a simple thing but I can't find a solution at all.

Upvotes: 0

Views: 90

Answers (1)

user5483739
user5483739

Reputation:

To change the tab bar icons, add this line of code in the didFinishLaunchingWithOptions: method of the AppDelegate.swift file:

UITabBar.appearance().tintColor = UIColor(red: 0.0/255/0, green: 0.0/255.0, blue: 
0.0/255.0, alpha: 1.0)

or

UITabBar.appearance().tintColor = UIColor.whiteColor()

I am just using these colours as an example.

Upvotes: 0

Related Questions