1. <tfoot id='vy7uw'></tfoot>

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

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

        如何将导航控制器添加到基于视图的应用程序中?

        How to add a navigation controller to a view-based application?(如何将导航控制器添加到基于视图的应用程序中?)

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

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

                <tfoot id='KjvIB'></tfoot>
                <i id='KjvIB'><tr id='KjvIB'><dt id='KjvIB'><q id='KjvIB'><span id='KjvIB'><b id='KjvIB'><form id='KjvIB'><ins id='KjvIB'></ins><ul id='KjvIB'></ul><sub id='KjvIB'></sub></form><legend id='KjvIB'></legend><bdo id='KjvIB'><pre id='KjvIB'><center id='KjvIB'></center></pre></bdo></b><th id='KjvIB'></th></span></q></dt></tr></i><div id='KjvIB'><tfoot id='KjvIB'></tfoot><dl id='KjvIB'><fieldset id='KjvIB'></fieldset></dl></div>
                  本文介绍了如何将导航控制器添加到基于视图的应用程序中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  是否可以将 UINavigationController 添加到继承自 UIViewController 而不是 UITableViewController 的视图应用程序?是怎么做到的?

                  Is it possible to add a UINavigationController to a view application that inherits from UIViewController and not UITableViewController? How is it done?

                  推荐答案

                  是的,您可以在任何基于视图的应用程序中使用导航控制器,无论是在根级别(例如在 Xcode 中创建基于导航的模板时)还是使用TabBar 根,或任何根.

                  Yes, you can have Navigation controllers in any view based application, whether at the Root level (like when you create the Navigation-based template in Xcode) or with a TabBar root, or with any Root.

                  一个例子,展示一个包含导航的模式视图(在我的应用中用于显示一系列表单):

                  One example, presenting a modal view including navigation (used in my app to display a series of forms):

                      UIViewController *control = [[MyViewController alloc] initWithNibName: @"MyViewController" bundle: nil];
                      UINavigationController *navControl = [[UINavigationController alloc] initWithRootViewController: control];
                      [self presentModalViewController: navControl animated: YES];
                      [control release];
                  

                  在另一个例子中,如果你想在根级别拥有它,但没有使用 Navigation 模板创建应用程序,在 AppDelegate 的 didFinishLaunching(...) 中:

                  In another example, if you want to have it at the root level, but didn't create the application with the Navigation template, in the AppDelegate's didFinishLaunching(...):

                      UINavigationController *navControl = [[UINavigationController alloc] initWithRootViewController: control];
                      [window setRootViewController: navControl];
                      [navControl release];
                  

                  您也可以在 Interface Builder 中设置它,通过设置您使用的 View 控制器的类(UIViewController 替换为 UINavigationController).

                  You can also set it in Interface Builder, by setting up the class of the View controller you use (UIViewController replaced by UINavigationController).

                  我希望这能回答你的问题(对之前的讨论感到抱歉).

                  I hope this answers your question (sorry about the previous discussion).

                  这篇关于如何将导航控制器添加到基于视图的应用程序中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  How to add a navigation controller programmatically in code but not as initial view controller(如何在代码中以编程方式添加导航控制器,但不作为初始视图控制器)
                  How to get the previous viewcontroller that pushed my current view(如何获取推送我当前视图的上一个视图控制器)
                  View being blocked by UITransitionView after being presented(呈现后被 UITransitionView 阻止的视图)
                  Show UITabBar when UIViewController pushed(推送 UIViewController 时显示 UITabBar)
                  Navigate Back to previous view controller(导航回上一个视图控制器)
                  How to detect if view controller is being popped of from the navigation controller?(如何检测是否从导航控制器弹出视图控制器?)

                • <legend id='BWzgT'><style id='BWzgT'><dir id='BWzgT'><q id='BWzgT'></q></dir></style></legend>

                    • <small id='BWzgT'></small><noframes id='BWzgT'>

                        <tbody id='BWzgT'></tbody>
                      <tfoot id='BWzgT'></tfoot>
                      • <bdo id='BWzgT'></bdo><ul id='BWzgT'></ul>

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