我试图解除一个名为 ModaViewController C
,回到A
. ModalViewController 出现在B
. 因此,导航流程是 A->B -(当前 ModalView)-> C。我可以取消ModalViewController
返回到 B,但我无法在完成括号中弹回 A。这是我尝试过的代码:
[self dismissViewControllerAnimated:YES completion:^{
[self.navigationController popToViewController:[[self.navigationController viewControllers] objectAtIndex:0] animated:YES];
}];
ModalViewController 被解除,但不会弹回 A。我将这段代码称为IBAction
.
有什么建议吗?
第二点,当我关闭控制器中的ModalViewController
所有内容时,我的所有内容都是空的/已解除分配。我也在使用ARC。UIPickers
B