我在嘗試從第二個視圖切換到第三個視圖時遇到切換xib的問題。在iPhone SDK中切換xib?
我進入從第一個這樣的第二種觀點...
-(IBAction)startButtonClicked:(id)sender{
Number2ViewController *screen = [[Number2ViewController alloc] initWithNibName:nil bundle:nil];
screen.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentModalViewController:screen animated:YES];
[screen release];
}
但是,當我在試圖讓第三視圖的第二視圖,應用程序崩潰...
-(IBAction)nextButtonClicked:(id)sender{
Number3ViewController *screen = [[Number3ViewController alloc] initWithNibName:nil bundle:nil];
screen.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentModalViewController:screen animated:YES];
[screen release];
}
我知道如何去到一個視圖,然後立即回用
[self dismissModalViewControllerAnimated:YES];
你怎麼只保留打算d儘管有不同意見,但不必先回去?
如果你可以發佈關於崩潰,這可能有助於細節。查看http://stackoverflow.com/questions/2588853/the-community-driven-gdb-primer – fbrereto 2010-04-07 17:50:50
一旦nextButtonClicked被激活,應用程序崩潰 – NextRev 2010-04-07 17:54:18