全局设置UITableView的属性|正确计算contentSize|MJRefresh mj_footer 能正常隐藏在底部,不因为数据过少展示在页面中部

可在AppDelegate中设置

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

        UITableView.appearance.estimatedRowHeight = 0;

        UITableView.appearance.estimatedSectionFooterHeight = 0;

        UITableView.appearance.estimatedSectionHeaderHeight = 0;

        UITableView.appearance.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;

    }

posted @ 2019-12-26 20:27  怀达  阅读(1398)  评论(0编辑  收藏  举报