'UINavigation text

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



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source