我正在正确地从 1 推送 test2ViewController,如下所示,
self.controller2 = [[test2ViewController alloc] initWithNibName:@"test2ViewController" bundle:nil anUser:self.idUser];
[[self navigationController] pushViewController:self.controller2 animated:NO];
[self.controller2 release];
从 2 到 1 我在再次初始化 1 后弹出它(需要初始化)。
self.controller1 = [[test1ViewController alloc] initWithNibName:@"test1ViewController" bundle:nil anUser:self.idUser];
[[self navigationController] popToRootViewControllerAnimated:NO];
[self.controller1 release];
并且在尝试从 1 再次推送 2 时出现问题,应用程序因错误而崩溃,
Pushing the same view controller instance more than once is not supported
做错了什么?谢谢你。