Skip to content

Instantly share code, notes, and snippets.

@vani2
Last active March 31, 2017 08:30
Show Gist options
  • Select an option

  • Save vani2/14c9874fbff1797b4e33d0d1e0123aa8 to your computer and use it in GitHub Desktop.

Select an option

Save vani2/14c9874fbff1797b4e33d0d1e0123aa8 to your computer and use it in GitHub Desktop.
Easy way to remove navigation bar back button title from all screens
// Parent View Controller
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
navigationItem.clearBackBarButtonItemLabel()
}
}
// Helper extension
extension UINavigationItem {
func clearBackBarButtonItemLabel() {
backBarButtonItem = UIBarButtonItem(title:"", style:.plain, target:nil, action:nil)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment