Hi,
I am sketching out the workflow of an app where you have a main menu 'Level 0' that calls a modal view 'Level 1', which calls another modal view 'Level 2'.
I am able to get this working, no problem AND I am able to dismiss the entire stack by using:
[[[self parentViewController] parentViewController] dismissModalViewControllerAnimated:YES];
in the modal view 'Level 2'.
My problem is when modal view 'Level 2' has a navigation bar I cannot dismiss the entire stack. The code I listed above only brings me back one level so it really acts the same as if I had done this:
[self dismissModalViewControllerAnimated:YES];
on modal view 'Level 2'.
Summary: When modal view 'Level 1' calls modal view 'Level 2' using the following:
Level2 *level2 = [[[Level2 alloc] initWithNibName:@"Level2" bundle:nil] autorelease];
[self presentModalViewController:portalMainController animated:YES];
I can dismiss the entire stack and get back to the main menu (Level 0). BUT when 'Level 1' calls 'Level 2' with a navigation bar like the following:
Level2 *level2 = [[[Level2 alloc] initWithNibName:@"Level2" bundle:nil] autorelease];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:level2];
[self presentModalViewController:navigationController animated:YES];
[navigationController release];
I cannot get back to 'Level 0', I only get back to 'Level 1'.
Any suggestions?