0
我有3個不同的xib。我可以回去查看圖1和圖2用下面的代碼之間來回...iPhone UINavigation Controller問題?
本規範帶來了第二種觀點...
-(IBAction)startButtonClicked:(id)sender{
self.gamePlayViewController = [[GamePlayViewController alloc] initWithNibName:@"GamePlayViewController" bundle:nil];
[self.navigationController pushViewController:gamePlayViewController animated:YES];
[GamePlayViewController release];
}
本準則第二視圖下執行而讓我回到第一個視圖...
- (IBAction爲)backButtonClicked {
[self.navigationController popViewControllerAnimated:YES];
}
現在,當我嘗試執行此代碼(在第二個視圖中)以進入第三個視圖時...我得到SIGABRT和應用程序崩潰......爲什麼它會爲第一個視圖啓動第二個視圖,但不是爲了提出第三種觀點的第二種觀點?
- (IBAction爲)新思維{
self.thirdViewController = [[ThirdViewController alloc] initWithNibName:@"ThirdViewController" bundle:nil];
[self.navigationController pushViewController:thirdViewController animated:YES];
[thirdViewController release];
}