zoukankan      html  css  js  c++  java
  • tableView reloadData页面跳动问题

    参考: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];
        }];
  • 相关阅读:
    升级或安装 GNOME Shell
    安装eclipse for c/c++环境
    BT3入门之中文语言支持
    开始接触BT5-自动登录X界面
    标准流与序列化
    IO流
    Collection与Map容器
    常用类
    枚举与常用类
    异常处理机制
  • 原文地址:https://www.cnblogs.com/huaida/p/12076561.html
Copyright © 2011-2022 走看看