set navigation bar title programmatically swift code example
Example 1: swift change navigation bar title
let attrs = [
NSAttributedString.Key.foregroundColor: UIColor.white,
NSAttributedString.Key.font: UIFont(name: "Futura-Bold", size: 17)!
]
UINavigationBar.appearance().titleTextAttributes = attrs
Example 2: 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