Is it possible to create a UINavigationController within a ModalPopup?

Posted by aloo on Stack Overflow See other posts from Stack Overflow or by aloo
Published on 2010-06-01T18:06:13Z Indexed on 2010/06/01 18:43 UTC
Read the original article Hit count: 230

Hi I have a modalViewController that I am popping up using

[self presentModalViewController:myController animated:YES];

I have an event occurring within myController which I would like to result in another controller being pushed onto the navigation stack ON TOP OF myController (which again has been presented modally). How can I do this?

I have tried the following from within myController:

UINavigationController* navController = [[UINavigationController alloc] initWithRootViewController:self];
  NewController* n = [[NewController alloc] init];
  [navController pushViewController:n animated:YES];
  [n release];

This does not work however....

© Stack Overflow or respective owner

Related posts about iphone

Related posts about iphone-sdk