修改利用SVPullToRefresh 下拉刷新时tableView 被导航条覆盖一行的

解宏扬
2023-12-01

//修复刷新坐标起点问题

if ([self respondsToSelector:@selector(automaticallyAdjustsScrollViewInsets)])

    {

        self.automaticallyAdjustsScrollViewInsets=NO;

        UIEdgeInsets insets= _TableView.contentInset;

        insets.top= self.navigationController.navigationBar.bounds.size.height + [UIApplication sharedApplication].statusBarFrame.size.height;

        _TableView.contentInset = insets;

        _TableView.scrollIndicatorInsets = insets;

    }

//上啦下拉刷新

__weak ListViewController * list= self;

    [_TableView addPullToRefreshWithActionHandler:^{

        

        [list AddpullData];

    }];

    [_TableView addInfiniteScrollingWithActionHandler:^{

        

        [list InfinstData];

    }];

转载于:https://www.cnblogs.com/wangzhen-Me/p/4845108.html

 类似资料: