1

I have a navigation controller as a root view to the home view then a sign in view then the main view. When I sign in and segue to the main view using

vc.performSegueWithIdentifier("toMenuView", sender: nil)

I can slide back to the sign in view. I don't want that. How can I segue to the main view without having access to going back unless the user taps the sign out button and then goes back to the home view without again having access to go "back" to the main view?

1 Answers1

0

For gesture recogniser to swipe back to previous page.

self.navigationController.interactivePopGestureRecognizer.enabled = false

If you have a navigation bar, you might need to hide it too. Else you can also hide the back button by:

self.navigationController.navigationItem.backBarButtonItem.enabled = false

jo3birdtalk
  • 616
  • 5
  • 20