1
votes

Receiving the following message after trying to log out from my app:

Terminating app due to uncaught exception 'NSGenericException', reason: 'Could not find a navigation controller for segue 'MainMenuSegue'. Push segues can only be used when the source controller is managed by an instance of UINavigationController.'

Though it only happens after I've logged in my app through Facebook login.

Here's a link to an image of my Storyboard. Sorry I couldn't put it directly in Stack Over Flow. In the Image you'll see the segues and the Navigation controller.

1

1 Answers

1
votes

The error message is pretty clear. You're calling MainMenuSegue, which is a push segue. But the controller calling it isn't managed by a navigation controller. So there's no navigation stack to push the new view controller on to.

Don't use a push segue… or embed the source controller in a navigation controller.