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

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

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

      从 xcode 故事板可视化修改 UIToolbar

      时间:2023-06-01

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

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

              • <bdo id='M2bmt'></bdo><ul id='M2bmt'></ul>
                <tfoot id='M2bmt'></tfoot>
              • 本文介绍了从 xcode 故事板可视化修改 UIToolbar的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                限时送ChatGPT账号..

                我正在使用 XCode 4 和故事板我正在创建的应用程序,但是我无法直观地修改 UIToolbar.

                I'm using XCode 4 and storyboarding an application I'm creating, however I cannot visually modify the UIToolbar.

                我正在尝试修改 UITableViewController 内部的 UIToolbar - 但是我必须将 UIToolbar 放置在正确的层次结构之外,以便能够在视觉上对其进行修改.我试过把它放在视图控制器区域,但这并没有让它显示出来.

                I'm attempting to modify a UIToolbar that is inside of a UITableViewController - however I have to place the UIToolbar out of the correct hierarchy in order to be able to modify it visually. I've tried placing it onto the view controller area but that does not make it show up.

                在某一时刻,我能够让它出现在下面,因为它是自己的对象,但是我无法重新创建它.

                At one point I was able to make it appear below, as it's own object however I was not able to recreate that.

                一旦我能够让它看起来像这样

                Once I was able to get it to look like this

                推荐答案

                你的 UITableViewController 在一个 UINavigationController 里面,它已经有自己的 UIToolbar——你不需要将一个新的拖入你的视图层次结构中.Interface Builder 可以在 Inspector 面板的Simulated Metrics"下为您模拟工具栏.

                Your UITableViewController is inside a UINavigationController, which already has its own UIToolbar—you don't need to drag a new one into your view hierarchy. Interface Builder can simulate the toolbar for you under "Simulated Metrics" in the inspector panel.

                一旦模拟工具栏可见,只需将 UIBarButtonItem 拖入其中.如果您需要比按钮或间隔更复杂的东西,请使用带有自定义视图的自定义项.

                Once the simulated toolbar is visible, simply drag UIBarButtonItems into it. Use a custom item with a custom view if you need anything more complicated than a button or spacer.

                如果您需要您的工具栏项目需要是动态的,您可以通过 IBOutlet 维护一个引用,而不必将它们放在您的视图中.然后设置 UITableViewControllertoolbarItems 属性或在运行时调用 -setToolbarItems:animated: 以显示相应的项目.

                If you need your toolbar items need to be dynamic, you can maintain a reference via IBOutlets without necessarily having them in your view. Then set your UITableViewController's toolbarItems property or call -setToolbarItems:animated: at runtime to display the appropriate items.

                参见 Apple 的 UINavigationController 类参考:显示工具栏.

                See Apple's UINavigationController Class Reference: Displaying a Toolbar.

                这篇关于从 xcode 故事板可视化修改 UIToolbar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:如何区分iOS5上的屏幕锁定和主页按钮按下? 下一篇:我们如何以编程方式改变 iPhone 屏幕的亮度?

                相关文章

                最新文章

              • <small id='QHfIQ'></small><noframes id='QHfIQ'>

                <tfoot id='QHfIQ'></tfoot>
                1. <legend id='QHfIQ'><style id='QHfIQ'><dir id='QHfIQ'><q id='QHfIQ'></q></dir></style></legend>

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

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