MattS
0
Q:

swift show title on navigation bar programmatically

// 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

New to Communities?

Join the community