self.tableView.estimatedRowHeight = 0
self.tableView.estimatedSectionHeaderHeight = 0
self.tableView.estimatedSectionFooterHeight = 0
添加以上三行再试试 问题大概就解决了
不行的话 再加上这行
//解决上拉重复加载问题
if #available(iOS 11.0, *) {
tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentBehavior.never
} else {
tableView.translatesAutoresizingMaskIntoConstraints = false
}
网友评论