我有一个简单的 UITableView ( sample project here ),但部分标题不符合我在 heightForHeaderInSection
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
return 40;
}
表格 View 如下所示。 1 个部分标题的高度正确,但其他部分不正确。
当我使用 Reveal 应用程序检查 View 时,似乎在该部分的最后一个单元格之后有一种页脚。
我做错了什么?
最佳答案
这似乎是可行的
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
return 0.0001f; // 0.0f does not work
}
甚至更好,在 loadView
self.tableView.sectionFooterHeight = 0.0f;
关于ios - UITableView heightForHeaderInSection 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24430460/