解决MJRefresh上下拉刷新无法收回

//解决MJRefresh上下拉刷新无法收回
if (@available(iOS 11.0, *)) {
self.scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
if ([self.scrollView isKindOfClass:[UITableView class]]) {
// iOS 11的tableView自动算高默认自动开启,不想使用则要这样关闭
UITableView *tableView = (UITableView *)self.scrollView;
tableView.estimatedRowHeight = 0;
tableView.estimatedSectionHeaderHeight = 0;
tableView.estimatedSectionFooterHeight = 0;
}
} else {
// Fallback on earlier versions
self.automaticallyAdjustsScrollViewInsets = NO;
}

猜你喜欢

转载自blog.csdn.net/weixin_33963594/article/details/87757129