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

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

        <bdo id='l3UBr'></bdo><ul id='l3UBr'></ul>
      1. 为 UIRefreshControl 提供顶部插图

        时间:2023-06-12

          • <bdo id='5bCef'></bdo><ul id='5bCef'></ul>

            1. <tfoot id='5bCef'></tfoot>

                <tbody id='5bCef'></tbody>
            2. <legend id='5bCef'><style id='5bCef'><dir id='5bCef'><q id='5bCef'></q></dir></style></legend>

                  <small id='5bCef'></small><noframes id='5bCef'>

                  <i id='5bCef'><tr id='5bCef'><dt id='5bCef'><q id='5bCef'><span id='5bCef'><b id='5bCef'><form id='5bCef'><ins id='5bCef'></ins><ul id='5bCef'></ul><sub id='5bCef'></sub></form><legend id='5bCef'></legend><bdo id='5bCef'><pre id='5bCef'><center id='5bCef'></center></pre></bdo></b><th id='5bCef'></th></span></q></dt></tr></i><div id='5bCef'><tfoot id='5bCef'></tfoot><dl id='5bCef'><fieldset id='5bCef'></fieldset></dl></div>
                  本文介绍了为 UIRefreshControl 提供顶部插图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我使用类似的 UIRefreshControl(没有 UITableViewController):

                  I use an UIRefreshControl like it (without an UITableViewController) :

                  UIRefreshControl *refreshControl = [UIRefreshControl new];
                  [refreshControl addTarget:self action:@selector(viewDidBeginRefreshing:) forControlEvents:UIControlEventValueChanged];
                  [self.table addSubview:refreshControl];
                  

                  问题是刷新轮位于 UINavigationController 的半透明栏下方 (ios7).StackOverflow 上关于这个问题的话题很少.而且他们没有给我带来任何有价值的解决方案.

                  Problem is the refresh wheel is positioned below the UINavigationController's translucent bar (ios7). There is only a few topic on this problem on StackOverflow. And they didn't bring any valuable solution to me.

                  例如,我希望将 UIRefreshControl 的 y 位置向下 80px.

                  What I wish is to make my UIRefreshControl's y position 80px down for example.

                  注意:我知道不建议在 UITableViewController 之外使用 UIRefreshControl.所以不需要警告它.

                  Note : I know it's not recommended to use UIRefreshControl outside an UITableViewController. So no need to warn about it.

                  推荐答案

                  我找到了一个解决方案,非常简单,不是很干净,但效果很好.

                  I found a solution, very simple, not so clean but works like a charm.

                  只需要将刷新控件放在另一个设置的子视图中即可.

                  Just need to put the refresh control in another subview which is set down.

                  UIView *refreshView = [[UIView alloc] initWithFrame:CGRectMake(0, 80, 0, 0)];
                  [self.table addSubview:refreshView];
                  
                  UIRefreshControl *refreshControl = [UIRefreshControl new];
                  [refreshControl addTarget:self action:@selector(viewDidBeginRefreshing:) forControlEvents:UIControlEventValueChanged];
                  [refreshView addSubview:refreshControl];
                  

                  这篇关于为 UIRefreshControl 提供顶部插图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何在 UINavigationController 的 RootViewController 上显示返回按钮? 下一篇:如何全局更改 UINavigationBar 颜色?

                  相关文章

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

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

                    <tfoot id='Dr3tp'></tfoot>