📜  navigationview 隐藏标题 swiftui - Swift 代码示例

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

代码示例2
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)
}