参考:https://www.jianshu.com/p/5f033fdd4ddb

 

一般情况下

if (@available(iOS 11.0, *)) {

        self.estimatedRowHeight = 0;

        self.estimatedSectionFooterHeight = 0;

        self.estimatedSectionHeaderHeight = 0;

        self.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;

    }

可以解决

但是如果有切换不同类型cell的需求,还是会跳动

需要将简单的reloadData替换为

[UIView performWithoutAnimation:^{
        [self reloadSections:[NSIndexSet indexSetWithIndex:0] withRowAnimation:UITableViewRowAnimationNone];
    }];
[UIView performWithoutAnimation:^{
        [self reloadData];
    }];

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-18
  • 2022-02-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-04
  • 2022-12-23
  • 2022-12-23
  • 2021-06-20
相关资源
相似解决方案