Swift - How to hide back button in navigation item?

后端 未结 9 994
走了就别回头了
走了就别回头了 2020-11-30 23:06

Right now I have two view controllers. My problem is I don\'t know how to hide the back button after transitioning to the second view controller. Most references that I foun

9条回答
  •  遥遥无期
    2020-11-30 23:53

    You may try with the below code

    override func viewDidAppear(_ animated: Bool) {
        self.navigationController?.isNavigationBarHidden = true
    }
    

提交回复
热议问题