【发布时间】:2014-03-29 21:40:07
【问题描述】:
我想在 UITableView 中隐藏第一部分的头部。因此,我在以下函数中将高度设置为 0。但是标题仍然显示?怎么了?如果我将其设置为例如1 我看到桌子顶部有一条小线。有什么想法吗?
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
if (section == 0) {
return 0;
} else {
return 18;
}
}
【问题讨论】:
-
描述了同样的问题,但我找到了更好的解决方案(见下文)。
标签: ios uitableview ios7.1