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.
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.
In my case, the problem was that I had omitted a call to [super loadView];
in the -loadView
method of embedded custom view controller.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With