UITableView heightForHeaderInSection遇到的坑

出现这种现象只需要把 heightforfoot改为0.01

- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
   
    return 30;
}

- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
    return 0.01;
}

 最终效果

原文地址:https://www.cnblogs.com/GJ-ios/p/6198053.html