I have a main view that I'm using swiftUI for and I want to hide the navbar for. I've used
.navigationBarTitle(Text("Home"), displayMode: .inline)
.navigationBarHidden(true)
to hide the navbar on this main page. My problem is that I use a navigation link to go to a UIKit view that I've created and I can't get the navbar to show up on this page no matter what I do. I've tried setting navigationBarHidden(false)
under the navLink and that doesn't work, nor does
override func viewDidAppear(_ animated: Bool) {
navigationController?.setNavigationBarHidden(false, animated: true)
super.viewDidAppear(animated)
}
in my UIKit view. I need to be able to have the back button displayed at the top for subsequent pages. Does anyone have any ideas?