NSGenericException', reason: 'Push segues can only be used when the source controller is managed by an instance of UINavigationController NSGenericException', reason: 'Push segues can only be used when the source controller is managed by an instance of UINavigationController ios ios

NSGenericException', reason: 'Push segues can only be used when the source controller is managed by an instance of UINavigationController


add Navigation Controller to your initial view

  1. Select the initial view
  2. Go To Editor--> Embed In --> Navigation Controller.


Set UINavigationcontroller as Initial View controller (Initial Scene) in StoryBoard.


In my case at the time the original VC performed the segue, the Navigation Controller was transitioning and already changed he visible VC.

I solved it by doing:

if (self.navigationController.visibleViewController == self) {    [self performSegueWithIdentifier:@"thankyou" sender:self];}

no more crash. :)