0

How can I change the text on the navigation bar programmatically ? My implementation below doesn't work.

override func viewDidLoad() {
    super.viewDidLoad()
    viewModel?.image = nil
    UINavigationBar.appearance().tintColor = .white
    navigationController?.navigationBar.barTintColor = UIColor.white
    self.view.backgroundColor = .black
}

enter image description here

burnsi
  • 6,194
  • 13
  • 17
  • 27
hp1232
  • 35
  • 5
  • 1
    What text are you referring to? Back button text? or the "Take Selfie' title? If it's the latter you can simply give a text to the `self.title` property inside `viewDidLoad()` – Visal Rajapakse Mar 14 '22 at 06:36
  • Does this https://stackoverflow.com/questions/28471164/how-to-set-back-button-text-in-swift solve your problem? – Christos Koninis Mar 14 '22 at 14:25

0 Answers0