• <tfoot id='tjt8P'></tfoot>

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

          <bdo id='tjt8P'></bdo><ul id='tjt8P'></ul>
        <legend id='tjt8P'><style id='tjt8P'><dir id='tjt8P'><q id='tjt8P'></q></dir></style></legend>
        <i id='tjt8P'><tr id='tjt8P'><dt id='tjt8P'><q id='tjt8P'><span id='tjt8P'><b id='tjt8P'><form id='tjt8P'><ins id='tjt8P'></ins><ul id='tjt8P'></ul><sub id='tjt8P'></sub></form><legend id='tjt8P'></legend><bdo id='tjt8P'><pre id='tjt8P'><center id='tjt8P'></center></pre></bdo></b><th id='tjt8P'></th></span></q></dt></tr></i><div id='tjt8P'><tfoot id='tjt8P'></tfoot><dl id='tjt8P'><fieldset id='tjt8P'></fieldset></dl></div>
      1. 如何在基于视图的应用程序中添加 uinavigation 控制器

        how to add uinavigation controller in a view based application(如何在基于视图的应用程序中添加 uinavigation 控制器)
        <legend id='ck1kf'><style id='ck1kf'><dir id='ck1kf'><q id='ck1kf'></q></dir></style></legend>
            <i id='ck1kf'><tr id='ck1kf'><dt id='ck1kf'><q id='ck1kf'><span id='ck1kf'><b id='ck1kf'><form id='ck1kf'><ins id='ck1kf'></ins><ul id='ck1kf'></ul><sub id='ck1kf'></sub></form><legend id='ck1kf'></legend><bdo id='ck1kf'><pre id='ck1kf'><center id='ck1kf'></center></pre></bdo></b><th id='ck1kf'></th></span></q></dt></tr></i><div id='ck1kf'><tfoot id='ck1kf'></tfoot><dl id='ck1kf'><fieldset id='ck1kf'></fieldset></dl></div>
            <tfoot id='ck1kf'></tfoot>
            • <bdo id='ck1kf'></bdo><ul id='ck1kf'></ul>
                <tbody id='ck1kf'></tbody>

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

                1. 本文介绍了如何在基于视图的应用程序中添加 uinavigation 控制器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我想将导航控制器添加到基于视图的应用程序中.我们如何以编程方式和使用 xib 文件来做到这一点..

                  I wanted to add a navigation controller to a view based application . how can we do this both programmatically and using xib file..

                  推荐答案

                  如果你需要在你的 uiviewcontroller 中加入导航控制器,你需要按照如下方式初始化它

                  If you need to incorporate a navigation controller in your uiviewcontroller you need to initialize it as it follows

                  UIViewController *yourViewController = ...
                  
                  UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:yourViewController];
                  
                  [self presentModalViewController:navController animated:YES];
                  
                  //you need to release the controller
                  [navController release];
                  

                  如果你在 UIApplicationDelegate 方法中

                  If you are in the UIApplicationDelegate method

                  - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    
                  

                  你不能做一个 presentModalViewController:navController 动画...然后你需要将 navController.view 添加到窗口

                  You can't do a presentModalViewController:navController animated... then you need to add the navController.view to the window

                      UIViewController *yourViewController = ...
                  
                      UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:yourViewController];
                      [self.window addSubview:navController.view];
                      //don't do a release of navController because is not retained by addSubview
                  

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

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

                  相关文档推荐

                  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 get the previous viewcontroller that pushed my current view(如何获取推送我当前视图的上一个视图控制器)
                  The correct way to set a light status bar text color in iOS 7 based on different ViewControllers(iOS 7中基于不同ViewControllers设置灯光状态栏文字颜色的正确方法)
                  Show UITabBar when UIViewController pushed(推送 UIViewController 时显示 UITabBar)
                2. <legend id='OKfSv'><style id='OKfSv'><dir id='OKfSv'><q id='OKfSv'></q></dir></style></legend>
                  <i id='OKfSv'><tr id='OKfSv'><dt id='OKfSv'><q id='OKfSv'><span id='OKfSv'><b id='OKfSv'><form id='OKfSv'><ins id='OKfSv'></ins><ul id='OKfSv'></ul><sub id='OKfSv'></sub></form><legend id='OKfSv'></legend><bdo id='OKfSv'><pre id='OKfSv'><center id='OKfSv'></center></pre></bdo></b><th id='OKfSv'></th></span></q></dt></tr></i><div id='OKfSv'><tfoot id='OKfSv'></tfoot><dl id='OKfSv'><fieldset id='OKfSv'></fieldset></dl></div>

                    <tfoot id='OKfSv'></tfoot>

                        <tbody id='OKfSv'></tbody>

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

                        • <bdo id='OKfSv'></bdo><ul id='OKfSv'></ul>