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

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

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

      <tfoot id='e8ndE'></tfoot>
    1. <legend id='e8ndE'><style id='e8ndE'><dir id='e8ndE'><q id='e8ndE'></q></dir></style></legend>
    2. 如何在导航栏中放置 UIImage 使其成为徽标?

      How to place a UIImage in Navigationbar such that its a logo?(如何在导航栏中放置 UIImage 使其成为徽标?)
        • <bdo id='HMdSs'></bdo><ul id='HMdSs'></ul>
        • <small id='HMdSs'></small><noframes id='HMdSs'>

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

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

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

              1. 本文介绍了如何在导航栏中放置 UIImage 使其成为徽标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我想在 NavigationBar 的左侧放置一个徽标/图像.我在代码中尝试了这个,但它不能正常工作.

                I would like to place a logo/image in the left side of NavigationBar. I try this in codes, but it is not worked properly.

                UIImage *logo = [UIImage imageNamed:@"logo.png"];
                UIImageView *imageView = [[UIImageView alloc] initWithImage: logo];
                imageView.frame = CGRectMake(2, 2, 40, 40);
                self.navigationItem.titleView = [[UIImageView alloc] initWithImage:logo];
                

                我尝试先放置视图,然后将图像放置为 UIImageView,但对齐不好.而且在运行代码时视图似乎是空白...

                I try with view to be placed first then place image as UIImageView but alignment is not good. And moreover view appears to be white space while run the code..

                推荐答案

                Bar Button Item插入到左侧的Viewcontroller中,并在Bar item看图

                Insert the Bar Button Item into your Viewcontroller on left Side, and insert the image in Bar item see the image

                这篇关于如何在导航栏中放置 UIImage 使其成为徽标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                相关文档推荐

                ViewController in UINavigationController orientation change(UINavigationController 中的 ViewController 方向更改)
                How to add a navigation controller programmatically in code but not as initial view controller(如何在代码中以编程方式添加导航控制器,但不作为初始视图控制器)
                The correct way to set a light status bar text color in iOS 7 based on different ViewControllers(iOS 7中基于不同ViewControllers设置灯光状态栏文字颜色的正确方法)
                View being blocked by UITransitionView after being presented(呈现后被 UITransitionView 阻止的视图)
                presentViewController not supporting orientation in iOS 6(presentViewController 在 iOS 6 中不支持方向)
                Navigate Back to previous view controller(导航回上一个视图控制器)
              2. <small id='u1LfW'></small><noframes id='u1LfW'>

                      <bdo id='u1LfW'></bdo><ul id='u1LfW'></ul>
                        <tfoot id='u1LfW'></tfoot>
                            <tbody id='u1LfW'></tbody>

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