Reputation: 3415
I have an iphone app I have been working on for quite a while - Xcode 5.1 IOS 7.
The starting VC has a button which triggers a segue to a second VC. Inside that VC is a container view which has an embed segue to a navigation controller.
All of a sudden, without changing anything about the storyboard or segues, I am getting a crash when I attempt to segue to the second VC. The error is:
* Assertion failure in -[UIStoryboardEmbedSegue perform], /SourceCache/UIKit_Sim/UIKit-2935.137/UIStoryboardEmbedSegue.m:18 2014-04-11 10:10:58.371 5 Star Health[42501:60b] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'containerView is required.'
I have tried redoing just about everything on that second VC with no luck. I have also researched the error but have not found anything applicable.
Upvotes: 8
Views: 5665
Reputation: 394
In my case, the problem was that I had omitted a call to [super loadView];
in the -loadView
method of embedded custom view controller.
Upvotes: 9
Reputation: 3415
OK, I found the issue.
The controller with the container view was a custom view controller. Turns out I was inheriting from UINavigationController instead of UIViewController. Changing that fixed the issue.
Upvotes: 33