Answers for "swiftui navigation bar title color"

3

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
Posted by: Guest on March-04-2020
1

swift navigation bar title color

// Place this in your didFinishLaunchingWithOptions method in the AppDelegate
let attrs = [
  NSAttributedString.Key.foregroundColor: UIColor.white
]

UINavigationBar.appearance().titleTextAttributes = attrs
Posted by: Guest on June-16-2020
2

swift change navigation bar title

// 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
Posted by: Guest on June-16-2020
0

swift show title on navigation bar programmatically

override func viewDidLoad() {
     super.viewDidLoad()
     self.title = "Your title over here"
}
Posted by: Guest on July-02-2020

Code answers related to "swiftui navigation bar title color"

Code answers related to "Swift"

Browse Popular Code Answers by Language