<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?

        How to add 2 buttons into the UINavigationbar on the right side without IB?(如何在没有IB的情况下将2个按钮添加到右侧的UINavigationbar?)

      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?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  iOS 6 rotations: supportedInterfaceOrientations doesn#180;t work?(iOS 6 旋转:supportedInterfaceOrientations 不起作用?)
                  CABasicAnimation rotate returns to original position(CABasicAnimation 旋转返回原始位置)
                  UITabBarController Rotation Issues in ios 6(ios 6 中的 UITabBarController 旋转问题)
                  iOS: How to run a function after Device has Rotated (Swift)(iOS:设备旋转后如何运行函数(Swift))
                  How to rotate an image 90 degrees on iOS?(如何在 iOS 上将图像旋转 90 度?)
                  iOS 8 Rotation Methods Deprecation - Backwards Compatibility(iOS 8 旋转方法弃用 - 向后兼容性)
                  <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>

                        <tbody id='YspRw'></tbody>

                      <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>