Question

I have a menu screen that implements UINavigationController and on top of that screen, using presentModalViewController, I place another screen on which I want to have another UINavigationController. 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?

Was it helpful?

Solution

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];
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top