<bdo id='7eWCk'></bdo><ul id='7eWCk'></ul>

<small id='7eWCk'></small><noframes id='7eWCk'>

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

      <legend id='7eWCk'><style id='7eWCk'><dir id='7eWCk'><q id='7eWCk'></q></dir></style></legend>

        <tfoot id='7eWCk'></tfoot>
      1. 使用情节提要时如何继承导航控制器?

        How to subclass Navigation Controller when using storyboards?(使用情节提要时如何继承导航控制器?)
          <tbody id='5Ren8'></tbody>
          <bdo id='5Ren8'></bdo><ul id='5Ren8'></ul>
          <tfoot id='5Ren8'></tfoot>

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

                  <small id='5Ren8'></small><noframes id='5Ren8'>

                  本文介绍了使用情节提要时如何继承导航控制器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在使用 Xcode 菜单编辑器...嵌入...导航控制器"在界面构建器中使用情节提要.

                  I'm using storyboards in interface builder using the Xcode menu 'Editor...Embed in...Navigation Controller'.

                  似乎在 iOS 6 中,您必须将 UINavigationController 子类化以允许所有方向,使用

                  It seems that in iOS 6 you have to subclass the UINavigationController to allow all orientations, with

                  - (NSUInteger)supportedInterfaceOrientations {
                      return (UIInterfaceOrientationMaskAll   );
                  }
                  

                  但是由于代码中没有对 UINavigationController 的引用,如何将 UINavigationController 子类化为情节提要应用程序?

                  But how do I subclass the UINavigationController with a storyboard app as there is no reference to it in the code?

                  推荐答案

                  可以从storyboard中选择导航控制器场景的导航控制器:

                  You can select the navigation controller scene's navigation controller from the storyboard:

                  然后使用右侧的身份检查器更改类:

                  And then use the identity inspector on the right to change the class:

                  例如,将类"更改为 MyCustomNavigationController,然后在您的项目中创建一个名为 MyCustomNavigationController 的新类:

                  For instance change the "Class" there to MyCustomNavigationController and then just create a new class in your project called MyCustomNavigationController:

                  MyCustomNavigationController.h:

                  #import <UIKit/UIKit.h>
                  
                  @interface MyCustomNavigationController : UINavigationController
                  @end
                  

                  MyCustomNavigationController.m:

                  @implementation MyCustomNavigationController
                  
                  - (NSUInteger)supportedInterfaceOrientations {
                      return UIInterfaceOrientationMaskAll;
                  }
                  
                  ... any other methods you want ...
                  
                  @end
                  

                  这篇关于使用情节提要时如何继承导航控制器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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)
                    <i id='ULQd6'><tr id='ULQd6'><dt id='ULQd6'><q id='ULQd6'><span id='ULQd6'><b id='ULQd6'><form id='ULQd6'><ins id='ULQd6'></ins><ul id='ULQd6'></ul><sub id='ULQd6'></sub></form><legend id='ULQd6'></legend><bdo id='ULQd6'><pre id='ULQd6'><center id='ULQd6'></center></pre></bdo></b><th id='ULQd6'></th></span></q></dt></tr></i><div id='ULQd6'><tfoot id='ULQd6'></tfoot><dl id='ULQd6'><fieldset id='ULQd6'></fieldset></dl></div>
                    • <bdo id='ULQd6'></bdo><ul id='ULQd6'></ul>

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

                            <tbody id='ULQd6'></tbody>
                          <legend id='ULQd6'><style id='ULQd6'><dir id='ULQd6'><q id='ULQd6'></q></dir></style></legend>

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