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 使其成为徽标?

      时间:2023-06-13
        • <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 使其成为徽标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:iOS:删除 UINavigationBar 动画 下一篇:以编程方式创建居中的 UIBarButton

                相关文章

              2. <small id='u1LfW'></small><noframes id='u1LfW'>

                      <bdo id='u1LfW'></bdo><ul id='u1LfW'></ul>
                    <tfoot id='u1LfW'></tfoot>
                  1. <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>