ios6 multi-pane iPad interface with container views

621 Views Asked by At

I'm trying to implement (what I thought would be) a straightforward, full-screen, four-pane iPad app interface by using container views. I have a simple root UIViewController containing a single view, in which are four container views, each with an embedded view controller (two panes each having a UITableViewController, and two panes each having a UIViewController). This was a breeze to create in Interface Builder, but when I run the app I get the following errors, apparently when the first embed segue is performed (i.e., after prepareForSegue is called with the embed segue for one of the two UITableViewControllers, but, apparently, before viewDidLoad is actually called on that UITableViewController):

* Assertion failure in -[UIStoryboardEmbedSegue perform], /SourceCache/UIKit_Sim/UIKit-2380.17/UIStoryboardEmbedSegue.m:18

* Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'containerView is required.'

Has anyone got a clue what I'm doing wrong? I can't seem to find any mention of this "containerView is required" error anywhere.

Thanks!

1

There are 1 best solutions below

0
On

Well, I figured it out, and it had nothing to do with container views. Rather, I was inadvertently reusing a navigation controller subclass that I developed for the iPhone version of the app as the root view controller of the iPad version; and since a navigation controller does of course need a container view (which the root view controller in the iPad version does not have), it resulted in the error given. I'm leaving this up here in case anyone else encounters this rather cryptic error and made the same mistake I did!