答案 0 :(得分:1)
覆盖
tableView(_tableView:UITableView,heightForHeaderInSection部分:Int)
您将在运行时获得所需的行为。如果需要根据该部分更改值,则需要通过测试您所在的部分来手动进行。
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat
{
if section == 0 {
return CGFloat.leastNormalMagnitude
}else{
return 44
}
}