views:

99

answers:

1

For some reason, if I try to go back to the main menu using the back button on the upper left corner, only the title returns to the previous menu, but not the view controller. View controller would return to the previous menu only if I explicitly call popViewControllerAnimated using some other button.

Is there anyway to solve this? I think I've coded something wrong. Tried googling but couldn't find any cases like mine.

A: 

I'm getting the exact same problem. Here is my code:

- (IBAction) showGameView:(id) sender {
    gameView = [[TCGameViewController alloc] initWithNibName:@"TCGameViewController" bundle:[NSBundle mainBundle]];
    [self.navigationController pushViewController:gameView animated:YES];
    [gameView release];
}

And when I am done with gameView, I do this:

[self.navigationController setNavigationBarHidden:NO animated:YES];

But all it does when I push the 'back' button is cycle through the navigation bar, but never pops the view. I don't even know how to debug it.

In my other view, "infoView" I call the same code as before except the NavBar is never hidden, but it works just fine.

helps!

Stephen Furlani