I want to change the title of backbutton to any name in swift 3.I tried many ways but none of them worked for me.
self.navigationItem.backBarButtonItem?.titl
This is the way:
extension UINavigationController { func addCustomBackButton(title: String = "Back") { let backButton = UIBarButtonItem() backButton.title = title navigationBar.topItem?.backBarButtonItem = backButton } }