Reputation: 699
I have a question on iOS7. I have a default story board setup with a ViewController. I added another TableViewController and linked them using a button on ViewController. Xcode allows the linkage but when I run the app, Xcode crashes with the following error.
2014-03-29 20:58:34.862 VC to TableView[4668:60b] *** Terminating app due to uncaught exception 'NSGenericException', reason: 'Push segues can only be used when the source controller is managed by an instance of UINavigationController.'
Why can't i have the above setup? I've tried with a NavigationController in front and it works.
Upvotes: 0
Views: 110
Reputation: 9577
The solution is really easy. To have Push/Pop Segues, You need your views to be embedded inside a UINavigationController.
Upvotes: 1
Reputation: 119031
The error message is quite clear on the reason:
'Push segues can only be used when the source controller is managed by an instance of UINavigationController.'
the underlying reason being: where would the push go if you don't have a navigation controller...
So, you need a navigation controller or you need to use a modal segue.
Upvotes: 1