I need to hide the navigation bar only from the root view controller,
when i try to hide it from the storyboard by disabling the "Show Navigation Bar", it is hidden from all the other view controllers connected to that root view controller.
what can be possible solution ?
I solved it with this code:
override func viewWillDisappear(_ animated: Bool) {
self.navigationController?.setNavigationBarHidden(false, animated: animated);
super.viewWillDisappear(animated)
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
self.navigationController?.setNavigationBarHidden(true, animated: animated)
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With