【发布时间】:2012-03-13 05:32:50
【问题描述】:
我的 iPad 应用程序中的 rootviewcontroller 通过[self presentModalViewController:... animated:YES] 呈现一个模态视图控制器(我们称之为 ViewControllerA)。
有时,ViewControllerA 本身会通过[self presentModalViewController:... animated:YES] 呈现MFMailComposeViewController。
在委托方法mailComposeController:didFinishWithResult:error: 中,我想关闭两个控制器,MFMailComposeViewController 和 ViewControllerA。
但无论我尝试什么([self.parentViewController dismissModalViewControllerAnimated:YES]、[self dismissModalViewControllerAnimated:YES]、两次调用解除),只有MFMailComposeViewController 被解除,但 ViewControllerA 保持可见。
我已经找到了这篇文章 (http://stackoverflow.com/questions/3229755/dismissing-multiple-modal-view-controllers-at-once) 和这篇文章 (http://stackoverflow.com/questions/3105855 /how-to-move-to-first-viewcontroller-from-last-view-controller-among-multiple-vie),但建议的解决方案似乎对我不起作用。
我做错了什么?
【问题讨论】:
-
你试过不带动画就解散吗?
-
没有变化,只有邮件对话框消失了。
标签: ios ipad uiviewcontroller presentmodalviewcontroller