当我尝试从第二个视图切换到第三个视图时,我遇到了切换 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];
您如何在不必先返回的情况下继续看到不同的观点?