<tfoot id='5wukv'></tfoot>

  • <small id='5wukv'></small><noframes id='5wukv'>

    <legend id='5wukv'><style id='5wukv'><dir id='5wukv'><q id='5wukv'></q></dir></style></legend>

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

        <bdo id='5wukv'></bdo><ul id='5wukv'></ul>

      1. 如何在没有IB的情况下将2个按钮添加到右侧的UINavigationbar?

        时间:2023-05-17

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

          <bdo id='DbpBS'></bdo><ul id='DbpBS'></ul>
              <legend id='DbpBS'><style id='DbpBS'><dir id='DbpBS'><q id='DbpBS'></q></dir></style></legend>

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

                  <tfoot id='DbpBS'></tfoot>

                    <tbody id='DbpBS'></tbody>
                • 本文介绍了如何在没有IB的情况下将2个按钮添加到右侧的UINavigationbar?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  如何在没有 XIB 的情况下将 2 个按钮添加到 UINavigationBar 中?
                  2 个按钮应在 UINavigationBar 的右侧对齐.

                  How can I add 2 buttons into the UINavigationBar without XIB?
                  The 2 buttons should be aligned on the right side of the UINavigationBar.

                  我知道如何添加一个按钮,但是两个呢?

                  I know how I can add one button, but how about two?

                  推荐答案

                  使用 iOS 5+ 就这么简单:

                  With iOS 5+ it's as easy as:

                  UIBarButtonItem *btnShare = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAction target:self action:@selector(share)];
                  UIBarButtonItem *btnRefresh = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh target:self action:@selector(refresh)];
                  [self.navigationItem setRightBarButtonItems:[NSArray arrayWithObjects:btnShare, btnRefresh, nil]];
                  

                  这篇关于如何在没有IB的情况下将2个按钮添加到右侧的UINavigationbar?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:UINavigationController“pushViewController:animated"的完成处 下一篇:升级到 Xcode 5.1 和 iOS 7.1 后,在 segue 过渡期间导航栏上出现暗影

                  相关文章

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

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

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

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