I have a project using Storyboards and whenever I push a view controller with a segue, the dynamically created bar button item is always blue.
In Swift 3.0
let navigationBarAppearnce = UINavigationBar.appearance()
A navigation bar’s tintColor affects the color of the back indicator image, button titles, and button images.
navigationBarAppearnce.barTintColor = UIColor(red: 0.180, green: 0.459, blue: 0.733, alpha: 1.00)
The barTintColor property affects the color of the bar itself
navigationBarAppearnce.tintColor = UIColor.white
Final Code
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
let navigationBarAppearnce = UINavigationBar.appearance()
navigationBarAppearnce.barTintColor = UIColor(red: 0.180, green: 0.459, blue: 0.733, alpha: 1.00)
navigationBarAppearnce.tintColor = UIColor.white
navigationBarAppearnce.titleTextAttributes = [NSForegroundColorAttributeName: UIColor.white]
//Change status bar color
UIApplication.shared.statusBarStyle = .lightContent
return true
}