Switching xib's in iPhone SDK?
Posted
by NextRev
on Stack Overflow
See other posts from Stack Overflow
or by NextRev
Published on 2010-04-07T17:41:09Z
Indexed on
2010/04/07
17:43 UTC
Read the original article
Hit count: 378
I'm having issues with switching xib's when I try to from my second view into the third.
I get into the second view from the first like this...
-(IBAction)startButtonClicked:(id)sender{
Number2ViewController *screen = [[Number2ViewController alloc] initWithNibName:nil bundle:nil];
screen.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentModalViewController:screen animated:YES];
[screen release];
}
But when I'm in the second view trying to get to the third view, the app crashes...
-(IBAction)nextButtonClicked:(id)sender{
Number3ViewController *screen = [[Number3ViewController alloc] initWithNibName:nil bundle:nil];
screen.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentModalViewController:screen animated:YES];
[screen release];
}
I know how to go into one view and then immediately back using
[self dismissModalViewControllerAnimated:YES];
How do you just keep going to different views though without having to go back first?
© Stack Overflow or respective owner