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

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

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

        <tfoot id='gh3qh'></tfoot>

      2. 导航栏标题和后退按钮名称相同吗?

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

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

        1. <tfoot id='pVIyt'></tfoot>
              <tbody id='pVIyt'></tbody>

                <bdo id='pVIyt'></bdo><ul id='pVIyt'></ul>
                • 本文介绍了导航栏标题和后退按钮名称相同吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我在我的故事板项目中为导航栏创建了一个标题,但是当我移动到下一个视图控制器时,后退按钮显示的名称与我之前的导航栏(主导航栏)标题相同.?我可以设置单独的标题和后退按钮名称吗?

                  I created one title for navigationbar in my storyboard project ,but when I moved to next viewcontroller the back button shows the same name as my previous navigationbar(Main navigationbar) title.? Can i set separate title and back button names?

                  我尝试了以下代码,但它不起作用?为什么?

                  I tried following code but its not working ? why?

                   self.navigationItem.title=@"Recent Books";
                  self.navigationItem.backBarButtonItem.title=@"Back";
                  

                  推荐答案

                  根据UINavigationItem 类参考

                  "当此导航项紧挨在顶部项的下方时堆栈,导航控制器为此导航项的导航栏.[...]如果你想指定后退按钮的自定义图像或标题,您可以分配自定义此属性的栏按钮项(带有您的自定义标题或图像)而是."

                  "When this navigation item is immediately below the top item in the stack, the navigation controller derives the back button for the navigation bar from this navigation item. [...] If you want to specify a custom image or title for the back button, you can assign a custom bar button item (with your custom title or image) to this property instead."

                  因此,在您推动其他 VC 的第一个 VC 中尝试此操作

                  So try this in your first VC from where you are pushing other VC

                  self.navigationItem.title=@"Recent Books";
                  UIBarButtonItem *backButton = [[UIBarButtonItem alloc]
                                                     initWithTitle:@"Back"
                                                     style:UIBarButtonItemStylePlain
                                                     target:nil
                                                     action:nil];
                  self.navigationItem.backBarButtonItem=backButton;
                  

                  这篇关于导航栏标题和后退按钮名称相同吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:在 Objective-C 中的 iOS 6 上强制横向方向 下一篇:为 UINavigationController 制作自定义后退按钮

                  相关文章

                    <bdo id='VDsAJ'></bdo><ul id='VDsAJ'></ul>

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

                  <tfoot id='VDsAJ'></tfoot>

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