如何去掉navigationbar默认的返回按钮

2025-04-27 15:33:19
推荐回答(1个)
回答1:

  当使用[self.navigationControllerpushViewController:ucenter animated:YES]进行push一个viewController之后,默认生成的back button并不令人 满意,有时候需要更改当时首要就是去掉原有的back button很多地方都有说,但是没说明。
  去掉是在push之前ucenter.navigationItem.hidesBackButton = YES;[self.navigationControllerpushViewController:ucenter animated:YES];这样代码才会生效。