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

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

    <tfoot id='Lfahw'></tfoot>
    • <bdo id='Lfahw'></bdo><ul id='Lfahw'></ul>

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

        自定义 UINavigationController UINavigationBar

        时间:2023-06-10
        <i id='Dvblv'><tr id='Dvblv'><dt id='Dvblv'><q id='Dvblv'><span id='Dvblv'><b id='Dvblv'><form id='Dvblv'><ins id='Dvblv'></ins><ul id='Dvblv'></ul><sub id='Dvblv'></sub></form><legend id='Dvblv'></legend><bdo id='Dvblv'><pre id='Dvblv'><center id='Dvblv'></center></pre></bdo></b><th id='Dvblv'></th></span></q></dt></tr></i><div id='Dvblv'><tfoot id='Dvblv'></tfoot><dl id='Dvblv'><fieldset id='Dvblv'></fieldset></dl></div>

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

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

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

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

                • 本文介绍了自定义 UINavigationController UINavigationBar的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  基本上我想要一个自定义 UINavigationBar.我不希望它是半透明的"或任何东西,比如图片应用.

                  Basically I want a custom UINavigationBar. I don't want it to be "translucent" or anything, like the pictures app.

                  我基本上想完全删除它,但我仍然希望能够在推送导航控制器时添加后退按钮等,并且我希望推送视图(EG:UITableViewController)在它下面.

                  I basically want to completely remove it, but I still want to be able to add back buttons and such when navigation controllers are pushed, and I want the views (EG: UITableViewController) to be pushed down below it.

                  像这样:

                  任何想法如何实现这一点?

                  Any ideas how to achieve this at all?

                  谢谢

                  推荐答案

                  @implementation UINavigationBar (background)
                  
                  - (void)drawRect:(CGRect)rect {
                      UIImage *image = [UIImage imageNamed:@"navigationbar.png"];
                      [image drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];
                  }
                  
                  @end
                  

                  基本上,它并不能完全看穿 - 这是一个视觉谎言.实际做到这一点的唯一方法是重写 UINavigationBardrawRect: 方法,如上所示.

                  basically, its not completely see through - its a visual lie. The only way to do it realistically is to override UINavigationBar's drawRect: method, as shown above.

                  这篇关于自定义 UINavigationController UINavigationBar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:iOS - pushViewController 与 presentModalViewController 的区别 下一篇:iOS - UINavigationController 添加多个正确的项目?

                  相关文章

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

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

                  1. <small id='OPnKs'></small><noframes id='OPnKs'>

                  2. <legend id='OPnKs'><style id='OPnKs'><dir id='OPnKs'><q id='OPnKs'></q></dir></style></legend>