我有导航栏,当用户点击左栏按钮时它会清楚地打开...当用户点击外部或向左滑动栏时我想隐藏它。
这是我打开导航栏的代码:
menuViewController=storyboard?.instantiateViewController(withIdentifier: "MenuViewController") else { return }
menuViewController.modalPresentationStyle = .overCurrentContext
menuViewController.transitioningDelegate=self
present(menuViewController,animated: true)
最佳答案
这是隐藏/取消隐藏导航栏的行
self.navigationController?.navigationBar.isHidden = true
关于swift - 如何隐藏导航栏 Swift,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57328643/