0

我已经modalView(B)在另一个modalView(A)导航控制器上展示了一个。

问题是永远不会调用 的dealloc方法modalView(A),并且应用程序在从NSUserDefaults.

我无法弄清楚到底是什么问题?

编辑 :-

代码

ViewControllerA * aViewController = [[ViewControllerA alloc] initWithNibName:@"ViewControllerA" bundle:[NSBundle mainBundle]];
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController: aViewController];
navController.navigationBar.barStyle = UIBarStyleBlack;
[self presentViewController:navController animated:YES completion:^{}];
[aViewController release];
[navController release];

模态视图(B)

ViewControllerB *bViewController = [[ViewControllerA alloc] initWithNibName:@"ViewControllerA" bundle:[NSBundle mainBundle]];
[self presentViewController: bViewController animated:YES completion:^{}];  
[bViewController release];
4

0 回答 0