我有 2 个以模态方式呈现的视图控制器。
A presents B which presents C.
当我解雇C时,我也想解雇B。但我不知道该怎么做:
解雇C:
[self dismissModalViewControllerAnimated:YES]
//[delegate dismissB] //this doesn't work either when i create a delegate pattern
现在只剩下B了。我怎样才能将B从C中剔除呢?
刚刚发现你需要在 iOS 5 中使用presentingViewController。
[self.presentingViewController.presentingViewController dismissModalViewControllerAnimated:YES];
A -> B -> C
在模态 C 中运行上述代码将带您回到 A
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)