I am working on a project and want to hide the navigation bar in my App. I have already found some code in the web to hide the bar, but always when I hide it, the swipe back function disables. So I don't want to have the navigation bar, but I want to have the swipe back function.
I have already tried this code:
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)
}
And this code here too:
self.navigationController?.navigationBar.isHidden = true
And so on...