行和部分之间的UITableView空间
我想使UITableView尽可能接近iOS设置视图:
我如何创build不同部分之间的空间? 什么是最好的方法?
您只需在Interface Builder中select分组样式,它将按照每个部分分隔表格,与截图中的类似。
这是一个附件:
将UITableView的样式更改为“分组”
试试这些..
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { return 30; //according to your need.. }
我希望这有助于..
首先,iOS设置不使用ViewForSection,否则Section视图将被放置在顶层tableView中。
您可以返回一个空的containerView单元格作为该特定的indexPath,并停止didSelect,但请记住将空单元格包括到您用于其他单元格的数组中。
只需在表格中添加页脚高度即可:
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat { return 44 }