📜  swift 隐藏导航栏 - Swift 代码示例

📅  最后修改于: 2022-03-11 15:01:02.012000             🧑  作者: Mango

代码示例1
override func viewWillAppear(_ animated: Bool) {
    super.viewWillAppear(animated)
    navigationController?.setNavigationBarHidden(true, animated: animated)
}

override func viewWillDisappear(_ animated: Bool) {
    super.viewWillDisappear(animated)
    navigationController?.setNavigationBarHidden(false, animated: animated)
}