美文网首页iOS 知识库A知识点2复杂UI
iOS11 刷新TableView上下跳动

iOS11 刷新TableView上下跳动

作者: z小志 | 来源:发表于2017-11-29 15:07 被阅读661次

AppDelegate 添加

if #available(iOS 11.0, *) {
            UITableView.appearance().estimatedRowHeight = 0;
            UITableView.appearance().estimatedSectionFooterHeight = 0;
            UITableView.appearance().estimatedSectionHeaderHeight = 0;
            UITableView.appearance().contentInsetAdjustmentBehavior = .never
        }
        

还有一种设置了 UITableView.appearance().contentInsetAdjustmentBehavior = .never 还是跳动
这时候你在当前界面可能设置的 estimatedRowHeight(预估高度太小)

相关文章

网友评论

    本文标题:iOS11 刷新TableView上下跳动

    本文链接:https://www.haomeiwen.com/subject/jroubxtx.html