<tfoot id='gBv00'></tfoot>

      <small id='gBv00'></small><noframes id='gBv00'>

        <bdo id='gBv00'></bdo><ul id='gBv00'></ul>

    1. <i id='gBv00'><tr id='gBv00'><dt id='gBv00'><q id='gBv00'><span id='gBv00'><b id='gBv00'><form id='gBv00'><ins id='gBv00'></ins><ul id='gBv00'></ul><sub id='gBv00'></sub></form><legend id='gBv00'></legend><bdo id='gBv00'><pre id='gBv00'><center id='gBv00'></center></pre></bdo></b><th id='gBv00'></th></span></q></dt></tr></i><div id='gBv00'><tfoot id='gBv00'></tfoot><dl id='gBv00'><fieldset id='gBv00'></fieldset></dl></div>
      1. <legend id='gBv00'><style id='gBv00'><dir id='gBv00'><q id='gBv00'></q></dir></style></legend>

      2. 将 MFMailComposeViewController 推送到导航堆栈上?未以模态方式呈现

        Pushing an MFMailComposeViewController onto the navigation stack? Not presented modally(将 MFMailComposeViewController 推送到导航堆栈上?未以模态方式呈现)
            <bdo id='Y2rQP'></bdo><ul id='Y2rQP'></ul>
            <tfoot id='Y2rQP'></tfoot>
            <i id='Y2rQP'><tr id='Y2rQP'><dt id='Y2rQP'><q id='Y2rQP'><span id='Y2rQP'><b id='Y2rQP'><form id='Y2rQP'><ins id='Y2rQP'></ins><ul id='Y2rQP'></ul><sub id='Y2rQP'></sub></form><legend id='Y2rQP'></legend><bdo id='Y2rQP'><pre id='Y2rQP'><center id='Y2rQP'></center></pre></bdo></b><th id='Y2rQP'></th></span></q></dt></tr></i><div id='Y2rQP'><tfoot id='Y2rQP'></tfoot><dl id='Y2rQP'><fieldset id='Y2rQP'></fieldset></dl></div>
              <tbody id='Y2rQP'></tbody>

                <small id='Y2rQP'></small><noframes id='Y2rQP'>

                1. <legend id='Y2rQP'><style id='Y2rQP'><dir id='Y2rQP'><q id='Y2rQP'></q></dir></style></legend>
                  本文介绍了将 MFMailComposeViewController 推送到导航堆栈上?未以模态方式呈现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个表格视图,在其中一个单元格中显示联系人".选择此单元格后,我想推入一个 MFMailComposeViewController.

                  I have a table view, and in one of the cells, it says "contact". Upon selecting this cell, I'd like to push in a MFMailComposeViewController.

                  我似乎只能以模态方式呈现这个 MFMailComposeViewController.这里有什么问题?

                  I can only seem to present this MFMailComposeViewController modally. What is the problem here?

                  谢谢!

                  相关代码片段:

                  - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
                  
                  
                      MFMailComposeViewController *controller = [[MFMailComposeViewController alloc] init];
                      //*works*//[self.navigationController presentModalViewController:controller animated:YES];
                      //*broken*//[self.navigationController pushViewController:controller animated:YES];
                  

                  }

                  我得到的错误是:" * 由于未捕获的异常 'NSInvalidArgumentException' 导致应用程序终止,原因:'不支持推送导航控制器'* 在第一次抛出时调用堆栈:"

                  The error that I get is: " * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Pushing a navigation controller is not supported' * Call stack at first throw:"

                  所以看起来我已经有了一个导航控制器,并且由于 MFMailComposeViewController 是 UINavigationController 的子类,我正在将一个导航控制器推到另一个导航控制器上?

                  So it looks like I have a navigationController already, and since MFMailComposeViewController is a subclass of UINavigationController, I'm pushing a navController onto another navController?

                  我希望我的 UI 保持一致,因此我想将 MFMailComposeViewController 推送到导航堆栈上,而不是模态显示它.

                  I want my UI to be consistent, so I want to push a MFMailComposeViewController onto the nav stack rather than present it modally.

                  推荐答案

                  这是因为 MFMailComposeViewController 不是 UIViewController 的子类,而是 UINavigationController代码>.当您尝试将 UINavigationControllerUINavigationController 的子类推送到现有堆栈时,UINavigationController 会引发异常.允许以模态方式呈现 UINavigationController.

                  This is because MFMailComposeViewController isn't a subclass of UIViewController but of UINavigationController. UINavigationController throws an exception when you're attempting to push a UINavigationController or subclass of UINavigationController onto an existing stack. Presenting a UINavigationController modally is permitted.

                  这篇关于将 MFMailComposeViewController 推送到导航堆栈上?未以模态方式呈现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  UINavigationController inside a UITabBarController inside a UISplitViewController presented modally on iPhone(UISplitViewController 内的 UITabBarController 内的 UINavigationController 以模态方式呈现在 iPhone 上) - IT屋-程序员软件开发技术分
                  ViewController in UINavigationController orientation change(UINavigationController 中的 ViewController 方向更改)
                  Custom back button in UINavigationController(UINavigationController 中的自定义后退按钮)
                  How to add a navigation controller programmatically in code but not as initial view controller(如何在代码中以编程方式添加导航控制器,但不作为初始视图控制器)
                  The correct way to set a light status bar text color in iOS 7 based on different ViewControllers(iOS 7中基于不同ViewControllers设置灯光状态栏文字颜色的正确方法)
                  View being blocked by UITransitionView after being presented(呈现后被 UITransitionView 阻止的视图)

                  1. <tfoot id='5Hj3m'></tfoot>
                      <bdo id='5Hj3m'></bdo><ul id='5Hj3m'></ul>
                      <i id='5Hj3m'><tr id='5Hj3m'><dt id='5Hj3m'><q id='5Hj3m'><span id='5Hj3m'><b id='5Hj3m'><form id='5Hj3m'><ins id='5Hj3m'></ins><ul id='5Hj3m'></ul><sub id='5Hj3m'></sub></form><legend id='5Hj3m'></legend><bdo id='5Hj3m'><pre id='5Hj3m'><center id='5Hj3m'></center></pre></bdo></b><th id='5Hj3m'></th></span></q></dt></tr></i><div id='5Hj3m'><tfoot id='5Hj3m'></tfoot><dl id='5Hj3m'><fieldset id='5Hj3m'></fieldset></dl></div>

                        • <small id='5Hj3m'></small><noframes id='5Hj3m'>

                            <tbody id='5Hj3m'></tbody>

                            <legend id='5Hj3m'><style id='5Hj3m'><dir id='5Hj3m'><q id='5Hj3m'></q></dir></style></legend>