<tfoot id='2G723'></tfoot>
  • <small id='2G723'></small><noframes id='2G723'>

      <legend id='2G723'><style id='2G723'><dir id='2G723'><q id='2G723'></q></dir></style></legend>

        • <bdo id='2G723'></bdo><ul id='2G723'></ul>
        <i id='2G723'><tr id='2G723'><dt id='2G723'><q id='2G723'><span id='2G723'><b id='2G723'><form id='2G723'><ins id='2G723'></ins><ul id='2G723'></ul><sub id='2G723'></sub></form><legend id='2G723'></legend><bdo id='2G723'><pre id='2G723'><center id='2G723'></center></pre></bdo></b><th id='2G723'></th></span></q></dt></tr></i><div id='2G723'><tfoot id='2G723'></tfoot><dl id='2G723'><fieldset id='2G723'></fieldset></dl></div>

        iOS:UISplitViewController 无法推送到 UINavigationControl

        时间:2023-05-30
          <tbody id='KaGGw'></tbody>

          1. <legend id='KaGGw'><style id='KaGGw'><dir id='KaGGw'><q id='KaGGw'></q></dir></style></legend>

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

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

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

                  本文介绍了iOS:UISplitViewController 无法推送到 UINavigationController的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我有一个使用导航控制器的 XCode iPad 项目.我试图获取一个按钮来将 UISplitViewController 推送到导航堆栈,但收到此错误:

                  I have an XCode iPad project using a navigation controller. I tried to get a button to push a UISplitViewController to the navigation stack, but got this error:

                  拆分视图控制器不能推送到导航控制器

                  Split View Controllers cannot be pushed to a Navigation Controller

                  原来 UISplitViewController 不能很好地与 UINavigationController 配合使用.但是,单击此按钮时,我仍然需要显示拆分视图控制器.我该怎么做呢?而且,同样重要的是,如何制作后退按钮以便用户可以返回到导航控制器?

                  Turns out UISplitViewController doesn't play nicely with UINavigationController. However, I still need to show the split view controller when this button is clicked. How do I do this? And, also important, how do I make a back button so the user can be returned to the navigation controller?

                  推荐答案

                  要显示 SplitViewController,您需要使用 setRootViewController.这是因为 SplitViewController 必须是根视图控制器.

                  To display a SplitViewController you'll need to use setRootViewController. This is because a SplitViewController needs to be the root view controller.

                  来自 Apple 的文档:

                  From Apple's Documentation:

                  拆分视图控制器必须始终是您的任何界面的根创建.换句话说,您必须始终从UISplitViewController 对象作为应用程序的根视图窗户.然后,您的拆分视图界面的窗格可能包含导航控制器、标签栏控制器或任何其他类型的视图你需要实现你的接口的控制器.

                  A split view controller must always be the root of any interface you create. In other words, you must always install the view from a UISplitViewController object as the root view of your application's window. The panes of your split-view interface may then contain navigation controllers, tab bar controllers, or any other type of view controller you need to implement your interface.

                  要返回,您需要使用 setRootViewController 返回之前的页面.当我将我的 iPhone 应用程序转换为通用应用程序时遇到了这个问题,最终我使用了 iPhone 的导航控制器和 iPad 版本的 setRootViewController.这有点令人遗憾,因为你不能很好地为它制作动画不加一点修饰.

                  To get back you'll need to use setRootViewController to go back to the earlier page. I ran into this problem when I converted my iPhone app to universal, and ended up using a navigation controller for the iPhone and setRootViewController for the iPad version. It's a bit of a bummer because you can't animate it nicely without a bit of fudging.

                  这篇关于iOS:UISplitViewController 无法推送到 UINavigationController的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:如何检查视图控制器是否可以执行转场 下一篇:将 UIPopoverController 呈现在相同位置,仅更改箭头

                  相关文章

                  最新文章

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

                • <legend id='u2Buf'><style id='u2Buf'><dir id='u2Buf'><q id='u2Buf'></q></dir></style></legend>
                    • <bdo id='u2Buf'></bdo><ul id='u2Buf'></ul>

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