1

我正在开发一个基于导航的项目。

要从 A 到 B,我这样做:

First *firstClass=[[First alloc] initWithNibName:@"first" bundle:nil];

  [self.navigationController pushViewController:firstClass animated:YES];

然后从 B 到 C,我这样做:

 Second *secondClass=[[Second alloc] initWithNibName:@"Second" bundle:nil];

 [self.navigationController pushViewController:secondClass animated:YES];


Now, in C, I do this,trying to get back to A:

- (IBAction)goBack: (id)sender

{

[self.navigationController popToRootViewControllerAnimated:YES];

}

通过这样做,我可以成功导航回 A ,但是当我应用程序崩溃时

向后移动后更改 A 中的设备方向,因为它不会崩溃,当 A 是

第一次加载。对此有什么帮助吗?

4

0 回答 0