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

      <tfoot id='Aerq7'></tfoot>

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

        <i id='Aerq7'><tr id='Aerq7'><dt id='Aerq7'><q id='Aerq7'><span id='Aerq7'><b id='Aerq7'><form id='Aerq7'><ins id='Aerq7'></ins><ul id='Aerq7'></ul><sub id='Aerq7'></sub></form><legend id='Aerq7'></legend><bdo id='Aerq7'><pre id='Aerq7'><center id='Aerq7'></center></pre></bdo></b><th id='Aerq7'></th></span></q></dt></tr></i><div id='Aerq7'><tfoot id='Aerq7'></tfoot><dl id='Aerq7'><fieldset id='Aerq7'></fieldset></dl></div>
          <bdo id='Aerq7'></bdo><ul id='Aerq7'></ul>
      1. 不使用整个屏幕的导航控制器

        Navigation Controller that doesn#39;t use the whole screen(不使用整个屏幕的导航控制器)

        <tfoot id='Wkp9V'></tfoot>

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

            • <legend id='Wkp9V'><style id='Wkp9V'><dir id='Wkp9V'><q id='Wkp9V'></q></dir></style></legend>
              • <bdo id='Wkp9V'></bdo><ul id='Wkp9V'></ul>
                  <tbody id='Wkp9V'></tbody>
                • <i id='Wkp9V'><tr id='Wkp9V'><dt id='Wkp9V'><q id='Wkp9V'><span id='Wkp9V'><b id='Wkp9V'><form id='Wkp9V'><ins id='Wkp9V'></ins><ul id='Wkp9V'></ul><sub id='Wkp9V'></sub></form><legend id='Wkp9V'></legend><bdo id='Wkp9V'><pre id='Wkp9V'><center id='Wkp9V'></center></pre></bdo></b><th id='Wkp9V'></th></span></q></dt></tr></i><div id='Wkp9V'><tfoot id='Wkp9V'></tfoot><dl id='Wkp9V'><fieldset id='Wkp9V'></fieldset></dl></div>
                  本文介绍了不使用整个屏幕的导航控制器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个导航控制器,我不想用完整个屏幕.特别是,我想在屏幕顶部的栏中放置一个徽标图像.不幸的是,导航控制器似乎不是这样设计的.在界面生成器中,我不能让它占据屏幕的一部分.您将如何实现顶部的徽标图像和占据屏幕其余部分的导航控制器的效果?

                  解决方案

                  我自己没有这样做,但应该很简单.您需要一个包装视图控制器作为其父级(我们称之为 MyWrapperViewController),其视图层次结构最终可能如下所示:

                  <上一页>UIView -+(连接到 MyWrapperViewController 中的视图出口)|+-- UIView(你的标志放在这里)|+-- UIView(子"导航控制器的视图)

                  徽标视图可以是 UIViewUIImageView 或任何适合内容的类.

                  当您在某处为您的 MyWrapperViewController 类创建 UINavigationController 时,您可以调整其 view bounds 的大小小于全屏(可能是屏幕大小减去您的徽标大小,并带有适当的 origin 偏移量,因此它位于徽标下方),然后将其添加为子视图.

                  I have a navigation controller which I don't want to use up the whole screen. In particular, I want to put a logo image in a bar at the top of the screen. Unfortunately, the navigation controller doesn't seem to be designed this way. In interface builder, I can't make it take up part of a screen. How would you achieve the effect of a logo image up the top and a navigation controller taking up the rest of the screen?

                  解决方案

                  I haven't done this myself, but it should be pretty straight-forward. You'll need a wrapper view controller to be its parent (let's call it MyWrapperViewController), and its view hierarchy might ultimately look something like this:

                  UIView -+ (hooked up to the view outlet in MyWrapperViewController)
                          |
                          +-- UIView (Your logo goes here)
                          |
                          +-- UIView (The "child" navigation controller's view)
                  

                  The logo view can be a UIView, or a UIImageView, or whatever class is appropriate for the content.

                  When you create a UINavigationController somewhere for your MyWrapperViewController class, you can resize its view bounds to something smaller than full-screen (perhaps the size of the screen minus the size of your logo, with an appropriate origin offset so it's below the logo), and then add it as a subview.

                  这篇关于不使用整个屏幕的导航控制器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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)
                • <small id='oXKyC'></small><noframes id='oXKyC'>

                    <tbody id='oXKyC'></tbody>

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

                    <legend id='oXKyC'><style id='oXKyC'><dir id='oXKyC'><q id='oXKyC'></q></dir></style></legend>

                      <tfoot id='oXKyC'></tfoot>

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