嗨,有很多问题要回答UITableView的UITableViewCell的动态高度.但是当我为sectionFooterHeight做这件事时,我觉得很奇怪.
代码为:
tableView.sectionHeaderHeight = UITableViewAutomaticDimension tableView.estimatedSectionHeaderHeight = 25 tableView.sectionFooterHeight = UITableViewAutomaticDimension tableView.estimatedSectionFooterHeight = 50
并且在xib中为页脚视图设置了约束
虽然它适用于headerview但不适用于页脚
解决方法
我认为你需要实现tableView:heightForFooterInSection:并返回UITableViewAutomaticDimension