On iOS 7.x (only), When I call [self performSegueWithIdentifier:@"MySegue"]
, while self
is a UINavigationController
, I get the following NSGenericException
:
Could not find a navigation controller for segue 'MySegue'. Push segues can only be used when the source controller is managed by an instance of UINavigationController.
Oddly enough, on iOS 8.x it works perfectly!
Every solution I saw regarding this exception tells you to embed the source view controller inside a UINavigationController, however in my case self
is already a UINavigationController by itself.
It makes sense that performSegueWithIdentifier:
would work when called on UINavigationController, and it does on iOS 8, so what's the problem on iOS 7??