<tfoot id='CkoUk'></tfoot>
    <bdo id='CkoUk'></bdo><ul id='CkoUk'></ul>

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

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

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

      self.title 设置navigationController 和tabBarItem 的标题?为什么?

      self.title sets navigationController and tabBarItem#39;s title? Why?(self.title 设置navigationController 和tabBarItem 的标题?为什么?)

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

            • <bdo id='BihOl'></bdo><ul id='BihOl'></ul>
                本文介绍了self.title 设置navigationController 和tabBarItem 的标题?为什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                限时送ChatGPT账号..

                我在 UIViewController 中为我的一个标签执行此操作:

                I do this in a UIViewController for one of my tabs:

                self.title = @"Welcome";
                

                但是,它会覆盖我对 tabBarItem 的所有内容.我试过了:

                However, it's overwriting whatever I have for the tabBarItem. I have tried:

                self.tabBarItem.title = @"Home";
                

                [self.tabBarItem initWithTitle:@"Home" image:[UIImage imageNamed:@"iconHome.png"] tag:0];
                

                但是,self.title 仍然会覆盖 tabBarItem,无论我是否在 设置标题之后尝试后两段代码.代码甚至可以正常运行,但是 self.tabBarItem.titleinitWithTitle 什么也没做?

                But still, self.title overwrites the tabBarItem, regardless of whether I am trying the two latter pieces of code after the title has been set. The code even runs without errors, but the self.tabBarItem.title or initWithTitle doesn't do anything?

                推荐答案

                好的,我想通了!这就是我正在做的事情:

                OK, I figured it out! Here's what I am doing:

                self.title = @"Title for TabBarItem"; // TabBarItem.title inherits the viewController's self.title
                self.navigationItem.title = @"Title for NavigationBar";
                

                navigationBar 将继承 self.title,除非另外使用 self.navigationItem.title

                the navigationBar would inherit self.title, unless otherwise set using self.navigationItem.title

                这篇关于self.title 设置navigationController 和tabBarItem 的标题?为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                相关文档推荐

                UIImageView Gestures (Zoom, Rotate) Question(UIImageView 手势(缩放、旋转)问题)
                Responsive website on iPhone - unwanted white space on rotate from landscape to portrait(iPhone上的响应式网站-从横向旋转到纵向时不需要的空白)
                How to rotate an image 90 degrees on iOS?(如何在 iOS 上将图像旋转 90 度?)
                How to capture current view screenshot and reuse in code? (iPhone SDK)(如何捕获当前视图屏幕截图并在代码中重用?(iPhone SDK))
                iOS 6 shouldAutorotate: is NOT being called(iOS 6 shouldAutorotate: 没有被调用)
                What is the PastryKit Framework?(PastryKit 框架是什么?)
                <i id='1xpP1'><tr id='1xpP1'><dt id='1xpP1'><q id='1xpP1'><span id='1xpP1'><b id='1xpP1'><form id='1xpP1'><ins id='1xpP1'></ins><ul id='1xpP1'></ul><sub id='1xpP1'></sub></form><legend id='1xpP1'></legend><bdo id='1xpP1'><pre id='1xpP1'><center id='1xpP1'></center></pre></bdo></b><th id='1xpP1'></th></span></q></dt></tr></i><div id='1xpP1'><tfoot id='1xpP1'></tfoot><dl id='1xpP1'><fieldset id='1xpP1'></fieldset></dl></div>

                    <small id='1xpP1'></small><noframes id='1xpP1'>

                      <tbody id='1xpP1'></tbody>

                        <legend id='1xpP1'><style id='1xpP1'><dir id='1xpP1'><q id='1xpP1'></q></dir></style></legend>
                        • <bdo id='1xpP1'></bdo><ul id='1xpP1'></ul>
                        • <tfoot id='1xpP1'></tfoot>