MJRefresh icon indicating copy to clipboard operation
MJRefresh copied to clipboard

当 `Tabbleview` 在 `PlainStyle` 下,并且设置了 `SectionHeader`,这时用 MJRefreshBackNormalFooter 上拉,结束刷新时会跳动

Open kingwang2011 opened this issue 4 years ago • 3 comments

TabbleviewPlainStyle 下,并且设置了 SectionHeader,这时用 MJRefreshBackNormalFooter 上拉,结束刷新时会跳动

MJTableViewController.m 增加以下代码,用example18 刷新

- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
    return 100;
}

- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
    return @"会跳动的 Header";
}

kingwang2011 avatar Mar 23 '21 09:03 kingwang2011

PlainStyle 的确有这个问题

wolfcon avatar Mar 24 '21 02:03 wolfcon

建议先使用 AutoNormalFooter 替代, 关闭自动刷新 footer.automaticallyRefresh = NO;

对于有跳动类 + PlainStyle + SectionHeader 这几个组合起来的比较难处理. 而且, 由于 pin 的问题, 跳动类会修改 inset, 导致 SectionHeader pin 还是 hide, 会有边界条件, 不可避免的还会有跳动问题

wolfcon avatar Mar 24 '21 03:03 wolfcon

确实有这个问题,我也遇到了

wjling avatar Nov 02 '21 07:11 wjling