1
我正尝试在动态单元格之间添加空格。Swift中在tableviewcell之间添加空格
这是我的代码。我不明白为什么它不工作。
func tableView(tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return 50
}
func tableView(tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
let footer = UIView()
footer.backgroundColor = UIColor.clearColor()
return footer
}
[UITableViewCells之间间距]的可能的复制(http://stackoverflow.com/questions/28598830/spacing-between-uitableviewcells) –