I have a menu screen that implements UINavigationController and on top of that screen, using presentModalViewController, i place another screen that I wish to have another IUNavigationController. I have tried to implement another navigation controller to handle the new screen but I either get a navbar 1/8th the way down the screen and it crashes or nothing at all. I have tried [[UINavigationController alloc] initWithRootViewController:navigationConroller] with no success as well. I'm just using pushViewController to try and place the next nib on the stack which doesn't work. What am I doing wrong?
+3
A:
Although there are a lot of people saying on forums that Apple doesn't allow this I have got it to work. What you have to do is:
Map *mapScreen = [[[Map alloc] init] autorelease];
mapScreen.delegate = self;
UINavigationController *navController = [[[UINavigationController alloc] initWithRootViewController:mapScreen] autorelease];
[self presentModalViewController:navController animated:YES];
Rudiger
2009-10-26 07:31:40
This is the method I use as well, a UINavigationController is simply a subclass of a UIViewController, and you can do all the same things with it as you would do with a UIViewController.
Alex Gosselin
2010-09-07 04:09:20