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

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

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

    2. 如何将 UISegmentedControl 放在 NavigationController 下?

      How to put a UISegmentedControl under a NavigationController?(如何将 UISegmentedControl 放在 NavigationController 下?)
        <tbody id='MMELe'></tbody>
      <i id='MMELe'><tr id='MMELe'><dt id='MMELe'><q id='MMELe'><span id='MMELe'><b id='MMELe'><form id='MMELe'><ins id='MMELe'></ins><ul id='MMELe'></ul><sub id='MMELe'></sub></form><legend id='MMELe'></legend><bdo id='MMELe'><pre id='MMELe'><center id='MMELe'></center></pre></bdo></b><th id='MMELe'></th></span></q></dt></tr></i><div id='MMELe'><tfoot id='MMELe'></tfoot><dl id='MMELe'><fieldset id='MMELe'></fieldset></dl></div>

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

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

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

                <tfoot id='MMELe'></tfoot>

                本文介绍了如何将 UISegmentedControl 放在 NavigationController 下?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我想知道让 UISegmentedControl 出现在 navigationController 下方的最佳方法是什么,就像在 AppStore 应用程序中一样:

                I was wondering what the best approach in order to have a UISegmentedControl appears just under the a navigationController just like in the AppStore application:

                我要放在不同视图中的内容是 UITableView,就像 AppStore 应用一样.

                The content I what to put in the different views are UITableView just like the AppStore app.

                到目前为止我的想法是:

                What I was thinking so far was:

                • 带有 UIToolbar 的 viewControllerUISegmentedController
                • 在这个 ViewController 中附加我的 UITableViews

                但我想不通的是如何构造我的控制器源代码文件.

                But what I can't figure out, is how to structure my controller source code files.

                您有最佳实践、工作示例或至少是建议吗?

                Do you have best practice, working examples or at least advices?

                推荐答案

                我会使用 UITableViewtableHeaderView 属性.这样它将与表格视图的内容一起滚动.

                I would use UITableView's tableHeaderView property for that. That way it will scroll together with the table view's contents.

                为了防止栏与表格内容一起滚动,我会将其设为兄弟视图(相对于 UITableView)并将其放置在表格视图的上方.如果您选择这种方法,您将拥有以下视图层次结构:控制器的视图包含工具栏和表格视图.请注意,您必须自己设置表格视图并在 -viewWillAppear: 中处理行取消选择,复制 UITableViewController 的功能.

                To prevent the bar from scrolling together with the table content, I would make it a sibling view (relative to UITableView) and place it just above the table view. If you choose this approach you will have the following view hierarchy: controller's view holds the toolbar and the table view. Note that you will have to set up the table view and handle row deselection in -viewWillAppear: yourself, duplicating functionality of UITableViewController.

                这篇关于如何将 UISegmentedControl 放在 NavigationController 下?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                相关文档推荐

                UINavigationController inside a UITabBarController inside a UISplitViewController presented modally on iPhone(UISplitViewController 内的 UITabBarController 内的 UINavigationController 以模态方式呈现在 iPhone 上) - IT屋-程序员软件开发技术分
                ViewController in UINavigationController orientation change(UINavigationController 中的 ViewController 方向更改)
                Custom back button in UINavigationController(UINavigationController 中的自定义后退按钮)
                How to get the previous viewcontroller that pushed my current view(如何获取推送我当前视图的上一个视图控制器)
                The correct way to set a light status bar text color in iOS 7 based on different ViewControllers(iOS 7中基于不同ViewControllers设置灯光状态栏文字颜色的正确方法)
                Show UITabBar when UIViewController pushed(推送 UIViewController 时显示 UITabBar)
              • <legend id='i7KVL'><style id='i7KVL'><dir id='i7KVL'><q id='i7KVL'></q></dir></style></legend>
                  <tfoot id='i7KVL'></tfoot>

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

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

                      <bdo id='i7KVL'></bdo><ul id='i7KVL'></ul>
                          <tbody id='i7KVL'></tbody>