change navigation item title color swift code example
Example 1: swift change navigation bar color
navigationController?.navigationBar.barTintColor = UIColor.green
navigationController?.navigationBar.titleTextAttributes = [.foregroundColor: UIColor.orange]
tabBarController?.tabBar.barTintColor = UIColor.brown
tabBarController?.tabBar.tintColor = UIColor.yellow
Example 2: how do change title color in navigation bar
navigationBar.largeTitleTextAttributes = [.foregroundColor: UIColor.white]
Example 3: swift navigation bar title color
let attrs = [
NSAttributedString.Key.foregroundColor: UIColor.white
]
UINavigationBar.appearance().titleTextAttributes = attrs