Tutorial – Set Navigation Bar Text Color
You can simply set the Navigation Bar text (tint) Color in XCode using one line of code. This is for the back button and any buttons with text on the left/right side.
I have setup a XCode project with a simple navigation controller as the root view controller of the default view. With an extra view added, with a segue to open it. It looks like:
To set the navigation bar item and back color tint/text color simply add the following line of code in viewDidLoad()
override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. self.navigationController?.navigationBar.barTintColor = UIColor.red }
If you run the app you will now see the Navigation Bar item text has is red: