Q:

swift change navigation bar color

// Navigation Bar:
navigationController?.navigationBar.barTintColor = UIColor.green

// Navigation Bar Text:
navigationController?.navigationBar.titleTextAttributes = [.foregroundColor: UIColor.orange]

// Tab Bar:
tabBarController?.tabBar.barTintColor = UIColor.brown

// Tab Bar Text:
tabBarController?.tabBar.tintColor = UIColor.yellow
2
// Place this in your didFinishLaunchingWithOptions method in the AppDelegate
let attrs = [
  NSAttributedString.Key.foregroundColor: UIColor.white, // changes color
  NSAttributedString.Key.font: UIFont(name: "Futura-Bold", size: 17)! // changes font
]

UINavigationBar.appearance().titleTextAttributes = attrs
2
// Place this in your didFinishLaunchingWithOptions method in the AppDelegate
let attrs = [
  NSAttributedString.Key.foregroundColor: UIColor.white
]

UINavigationBar.appearance().titleTextAttributes = attrs
1

New to Communities?

Join the community