objective-c - 删除分组 UITableView 部分之间的空格

标签 objective-c uitableview

可以删除分组 UITableView 的两个部分之间的这个小空间吗?

我通过设置这两个值来减少它:

enter image description here

里面有这段代码:

- (UIView*) tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
    return nil;
}

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

但我仍然看到灰色空间。

这是我最好的结果:

enter image description here

我想在删除灰色空间时删除灰色的小线。

最佳答案

我不久前遇到了这个问题..解决了返回0.1或可能0.01,具体取决于您的喜好..

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

return 0nil 似乎重置了高度..这也适用于标题..

这解决了我的问题,希望这也能解决你的问题..

关于objective-c - 删除分组 UITableView 部分之间的空格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30894756/

相关文章:

ios - 如何使用 UIPopoverBackgroundView 在 iOS 6 中呈现透明弹出窗口

ios - 如何使用 ARC 释放 iOS 7 中的私有(private)属性

swift - 如何在 UITableViewCell 中创建一个圆形?

ios - 如何同时滚动多个tableview

ios - UIButton 操作不起作用 ios

iphone - 多个 requestWithGraphPath Facebook iOS

iphone - 配置构建阶段的编译源

IOS - 最新版本的默认 TableView 单元格分隔符颜色

iphone - 文本编辑后更新时 UITableView 崩溃

ios - 来自两个 API 的一个 TableView