How to hide a navigation bar from first ViewController in Swift?

前端 未结 12 1552
悲哀的现实
悲哀的现实 2020-11-30 17:03

How can I hide a navigation bar from first ViewController or a particular ViewController in swift?

I used the following code in viewDidLoad():

12条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-30 17:11

     private func setupView() {
            view.backgroundColor = .white
            navigationController?.setNavigationBarHidden(true, animated: false)
        }
    

提交回复
热议问题