Jennifersl
0
Q:

swift navigation bar title 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.font: UIFont(name: "Futura-Bold", size: 17)!
]

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

UINavigationBar.appearance().titleTextAttributes = attrs
1
        
          init() {
            let navBarAppearance = UINavigationBar.appearance()
            navBarAppearance.largeTitleTextAttributes = [.foregroundColor: UIColor.white]
            navBarAppearance.titleTextAttributes = [.foregroundColor: UIColor.white]
          }          
        
      
0

New to Communities?

Join the community