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

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

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

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

        如何在 iphone 应用程序中设置 UINavigationBar 的高度

        时间:2023-06-10

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

          1. <tfoot id='umIvb'></tfoot><legend id='umIvb'><style id='umIvb'><dir id='umIvb'><q id='umIvb'></q></dir></style></legend>
              • <bdo id='umIvb'></bdo><ul id='umIvb'></ul>
                1. <i id='umIvb'><tr id='umIvb'><dt id='umIvb'><q id='umIvb'><span id='umIvb'><b id='umIvb'><form id='umIvb'><ins id='umIvb'></ins><ul id='umIvb'></ul><sub id='umIvb'></sub></form><legend id='umIvb'></legend><bdo id='umIvb'><pre id='umIvb'><center id='umIvb'></center></pre></bdo></b><th id='umIvb'></th></span></q></dt></tr></i><div id='umIvb'><tfoot id='umIvb'></tfoot><dl id='umIvb'><fieldset id='umIvb'></fieldset></dl></div>
                    <tbody id='umIvb'></tbody>
                  本文介绍了如何在 iphone 应用程序中设置 UINavigationBar 的高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我使用 UINavigationController 的典型情况,我想让导航栏高一点.设置它的边界和框架似乎没有什么区别,我正在使用这个代码

                  Im using a typical situation with UINavigationController, id like to make the navigation bar a bit taller. setting its bounds and frame dont seem to make a difference, im using this code

                      //set up the navigation
                  UINavigationController *navigationController = [UINavigationController new];
                  
                  [navigationController.navigationBar setBarStyle:UIBarStyleBlack];
                  [navigationController.navigationBar setTintColor:[UIColor purpleColor]];
                  [navigationController.navigationBar setBounds:CGRectMake(0.0, 0.0, 480.0, 100.0)];
                  [navigationController.navigationBar setFrame:CGRectMake(0.0, 0.0, 480.0, 100.0)];
                  

                  但无济于事.有任何想法吗?

                  but to no avail. any ideas?

                  推荐答案

                  我不认为你可以改变导航栏的高度.除非您添加提示消息...但这不是您想要的.

                  I don't think you can change the height of a navigation bar. Except when you add a prompt message... But that's not what you want.

                  框架是视图的可见区域.Bounds 是内部区域.通常它的原点为 (0, 0) 并且与框架一样宽和高.但是,当内容超出可见区域时(例如 UIScrollView),边界可能会更大(并且原点不同).您很少看到小于其各自框架的边界.

                  Frame is the visible area of a view. Bounds is the internal area. Usually this has an origin of (0, 0) and is as wide and high as the frame. However, when the content exceeds the visible area (like with a UIScrollView) the bounds can be larger (and the origin different). You rarely see bounds that are smaller than their respective frames.

                  查看您的代码,[UINavigationController new] 是关于什么的?你应该做 [[UINavigationController alloc] init],不是吗?

                  Looking at your code, what is [UINavigationController new] about? You should do [[UINavigationController alloc] init], shouldn't you?

                  另外,你所做的并不是真正的子类化......

                  Also, what you are doing is not really subclassing...

                  这篇关于如何在 iphone 应用程序中设置 UINavigationBar 的高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何进入“主页"在 iOS 应用程序中? 下一篇:iOS应用启动黑屏、UINavigationController、Nib、RootViewController

                  相关文章

                      <bdo id='79gGv'></bdo><ul id='79gGv'></ul>
                  1. <small id='79gGv'></small><noframes id='79gGv'>

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

                    1. <tfoot id='79gGv'></tfoot>
                      <legend id='79gGv'><style id='79gGv'><dir id='79gGv'><q id='79gGv'></q></dir></style></legend>