Home > Software engineering >  How to change title Color? swift 5
How to change title Color? swift 5

Time:05-15

I can't change title color, which is white by default and when my background color is white too, it's invisible. How can i change it to the black color? enter image description here

CodePudding user response:

Try this

self.navigationController?.navigationBar.titleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.red]
  • Related