zoukankan      html  css  js  c++  java
  • iOS7 下使用SVPullToRefresh 下拉刷新导航栏位置错误

    iOS7 下使用SVPullToRefresh 下拉刷新导航栏位置错误;

    下拉刷新之后,tableview的第一列会跑到导航栏的下面;

    修正:添加如下代码

        /**
         *  下拉刷新 增加一个;
         */
        
        //修复下拉刷新位置错误 代码开始
        if ([self respondsToSelector:@selector(automaticallyAdjustsScrollViewInsets)]) {
            self.automaticallyAdjustsScrollViewInsets = NO;
            
            UIEdgeInsets insets = self.tableView.contentInset;
            insets.top = self.navigationController.navigationBar.bounds.size.height +
            [UIApplication sharedApplication].statusBarFrame.size.height;
            self.tableView.contentInset = insets;
            self.tableView.scrollIndicatorInsets = insets;
        }
        
        //修复下拉刷新位置错误  代码结束
        
        __block RootViewController *bSelf = self;
        
        [self.tableView addPullToRefreshWithActionHandler:^{
            
            [bSelf addRows];
        }];
        
        
        /**
         *  拉到最后 加载更多,增加一个;
         */
        [self.tableView addInfiniteScrollingWithActionHandler:^{
            [bSelf addMoreRow];
        }];
    

      

  • 相关阅读:
    POJ 1144 Network(割点)
    POJ 3177 Redundant Paths & POJ 3352 Road Construction(双连通分量)
    ASCII码
    数组
    Java语法基础
    eclipse汉化过程
    指针
    面向对象
    第一课JAVA开发环境配置
    初学编写JAVA程序
  • 原文地址:https://www.cnblogs.com/cocoajin/p/3384049.html
Copyright © 2011-2022 走看看