I am having trouble installing View Viewer View Controller nib by default in Interface Builder. Here is my setup:
I have a TabBar based application where I load a navigation controller as a modal view ...
MyNavCtrlrSubClass *menu = [[MyNavCtrlrSubClass alloc]initWithNibName:@"MenuController" bundle:nil]; [tabBarController presentModalViewController:menu animated:anim];
The MenuController itself is structured as follows:
MenuController.xib
File Owner (MyNavCtrlrSubClass: UIViewController)
Navigation Controller (UINavigationController)
Navigation Bar (UINavigationBar)
Root View Controller (Nib Name is set to load AnotherViewController.nib)
Navigation Item -> (UINavigationItem)
All this works fine, except when loading MyNavCtrlrSubClass I get the following error:
Loaded the "MenuController" nib but the view outlet was not set
It is clear why this is happening. The file owner does not have an output connection to view it. The question is, what should I set as my presentation, and should I install something first? The navigation bar is the only candidate for MenuController.xib, but it will simply be the size of the UINavigationBar so to speak, in full screen mode.
I obviously missed something at IB, but what? MyNavCtrlrSubClass.m does not have the code itself, except for IBOutlet for UINavigationController. Am I mistaken when trying to install this completely in IB? The idea is to save the modal Navigation Controller in one tip, and all the views that it loads in separate tips, but since the MenuController is just a navigation container and doesn't contain any views, I'm obviously designing it wrong. :)
If you are wondering why I am not designing it in any other way, this is because I am trying to obey my (possibly erroneous) perception of how IB asks you to build an ideal hierarchy.
Any help would be greatly appreciated.
iphone uiviewcontroller interface-builder uiview uinavigationcontroller
Travis dunn
source share