How to remove all navigationbar back button title

后端 未结 30 3466
后悔当初
后悔当初 2020-12-12 15:42

When I push a UIViewController, it has some title in back button at new UIViewController, if the title has a lot of text, It does not look good in

30条回答
  •  余生分开走
    2020-12-12 15:57

    Just need go to your Parent ViewController from where your other ViewControllers are dependent.

    override func viewWillDisappear(animated: Bool) {
    super.viewWillDisappear(true)
    navigationItem.backBarButtonItem = UIBarButtonItem(title: "", style: .Plain, target: nil, action: nil)}
    

提交回复
热议问题