So I have a simple navigation controller with a sign up, hit done and you go to the home page. The problem is when you go to the home page, the navigation controller follows
//hide the navigation bar on this page
override func viewWillAppear(_ animated: Bool) {
self.navigationController?.isNavigationBarHidden = true
}
This will hide the navigation bar on your home page, but make sure you use viewWillAppear so whenever you come back to a page the navigation will not reappear.
Try to use a ViewController
only for the LoginView. Then use self.dismiss
with PerformSegue
to reach the NavigationController
.
Try
self.navigationController?.popViewControllerAnimated(true)
Update: Swift 4.2
self.navigationController?.popViewController(animated: true)
Is a signup view controller being presented Modally? Then, on sign up view controller, you could do
self.dismiss(animated: true, completion: nil)