views:

21

answers:

1

Hello,

I have been trying to add this UINavigationController to a subview of my form... all I am getting is a large grey screen.

LiteViewController *lite = [[LiteViewController alloc] initWithNibName:@"LiteViewController" bundle:nil];
[self.view addSubview:lite.navigationController.view];

It should add a full screen navigation controller to the current view. Any hep is greatly appreciated!

A: 

You might need a makeKeyAndVisible call.

Joost Schuur
To my understanding, the window is visible because I can add other things to the subview and it will work... just this navigationController is giving me a headache.
Dave C
I'm just getting started with iPhone development, but all the examples I've seen add navigation controllers straight to a UIWindow and not UIView. Maybe, given the full screen nature of this control, it wants to be added to a window? See Apple's docs here too: http://developer.apple.com/iphone/library/featuredarticles/ViewControllerPGforiPhoneOS/NavigationControllers/NavigationControllers.html#//apple_ref/doc/uid/TP40007457-CH103-SW1
Joost Schuur