How would I go about changing the color of the UINavigationBar
in Swift?
Most things online say to do something like:
[self.navigationContro
You can also change all UINavigationController
appearances in your app within the AppDelegate.swift
file. Just put the following code within the application:didFinishLaunchingWithOptions
function:
var navigationBarAppearace = UINavigationBar.appearance()
navigationBarAppearace.tintColor = UIColor.YourNavigationButtonsColor() // Back buttons and such
navigationBarAppearace.barTintColor = UIColor.YourBackgroundColor() // Bar's background color
navigationBarAppearace.titleTextAttributes = [NSForegroundColorAttributeName:UIColor.YourTitleColor()] // Title's text color
Creds: Coderwall's Blog Post