iPhone UINavigation Controller issue?

Posted by NextRev on Stack Overflow See other posts from Stack Overflow or by NextRev
Published on 2010-04-07T22:27:13Z Indexed on 2010/04/07 22:33 UTC
Read the original article Hit count: 347

I have 3 different xib's. I am able to go back and forth between view 1 and view 2 with the following code...

This Code brings up the second view...

-(IBAction)startButtonClicked:(id)sender{

    self.gamePlayViewController = [[GamePlayViewController alloc] initWithNibName:@"GamePlayViewController" bundle:nil];
    [self.navigationController pushViewController:gamePlayViewController animated:YES];
    [GamePlayViewController release];


}

This Code is executed in the second view and brings me back to the first view...

-(IBAction)backButtonClicked{

[self.navigationController popViewControllerAnimated:YES];

}

Now when I try to execute this code (in the second view) to get to the third view...I get SIGABRT and the app crashes...why does it work for the first view bringing up the second view, but not for the second view bringing up the 3rd view?

-(IBAction)nextView{

self.thirdViewController = [[ThirdViewController alloc] initWithNibName:@"ThirdViewController" bundle:nil];
        [self.navigationController pushViewController:thirdViewController animated:YES];
        [thirdViewController release];

}

© Stack Overflow or respective owner

Related posts about uinavigationcontroller

Related posts about iphone