I have a grouped UITableView where not all sections may be displayed at once, the table is driven by some data that not every record may have. My trouble is that the record
Here is the solution that worked for me
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
switch (section) {
case 1: case 3: case 5: return 20.0f; break;
default: return 0.01f; // for some reason 0 is not accepted - give something :)
}
}
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
switch (section) {
case 1: case 3: case 5: return 20.0f; break;
default: return 0.01f; // for some reason 0 is not accepted - give something :)
}
}