• <bdo id='FN9bX'></bdo><ul id='FN9bX'></ul>
      1. <legend id='FN9bX'><style id='FN9bX'><dir id='FN9bX'><q id='FN9bX'></q></dir></style></legend>

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

      3. <tfoot id='FN9bX'></tfoot>

        iPhone:向下移动 UINavigationBar?

        时间:2023-06-12

              <tbody id='mvtBS'></tbody>

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

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

                <bdo id='mvtBS'></bdo><ul id='mvtBS'></ul>
              • <tfoot id='mvtBS'></tfoot>
                • <legend id='mvtBS'><style id='mvtBS'><dir id='mvtBS'><q id='mvtBS'></q></dir></style></legend>
                  本文介绍了iPhone:向下移动 UINavigationBar?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试将导航栏定位在屏幕顶部下方.

                  I'm trying to position the navigation bar below the top of the screen.

                  我在 viewWillAppear 中尝试了以下方法:

                  I've tried the following in viewWillAppear:

                  self.navigationController.view.frame = CGRectMake(0.0, 54.0, 320.0, 426.0);
                  self.navigationController.navigationBar.frame = CGRectMake(0.0, 0.0, 320.0, 44.0);
                  

                  问题是它似乎只在第一次显示视图时才起作用.如果您转到另一个选项卡并返回,导航栏位于屏幕顶部.当 iPhone 旋转时也会发生这种情况.

                  The problem is it only seems to work the very first time the view is displayed. If you go to another tab, and back, the navigation bar is at the top of the screen. This also happens when the iPhone is rotated.

                  我应该尝试调整导航控制器框架,还是应该尝试将导航控制器添加到屏幕顶部下方的另一个视图?

                  Should I be trying to adjust the navigation controller frame, or should I instead try to add the navigation controller to another view that is below the top of the screen?

                  推荐答案

                  虽然晚了,但还是希望能帮到别人.我在 viewDidAppear:animated 中使用了 Stephens 代码,导航栏在返回选项卡时保持不变.这使我可以在导航栏上方使用徽标.我在 viewController 中使用了它.

                  Although late, I hope this can still help someone else out. I used Stephens code inside viewDidAppear:animated and the navigation bar stays put upon traveling back to the tab. This allowed me to use a logo above the navigation bar. I used this inside my viewController.

                      - (void)viewDidAppear:(BOOL)animated {
                  [super viewDidAppear:animated];
                  self.navigationController.view.frame = CGRectMake(0.0, 100.0, 320.0, 426.0); 
                  self.navigationController.navigationBar.frame = CGRectMake(0.0, 0.0, 320.0, 44.0); 
                  [self loadData];
                      }
                  

                  这篇关于iPhone:向下移动 UINavigationBar?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何在基于视图的应用程序中添加 uinavigation 控制器 下一篇:在目标视图控制器 viewWillAppear 中检测向后/弹出导航

                  相关文章

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

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

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

                      <tfoot id='MimYQ'></tfoot>