ios - 表格视图中的分隔符(Swift)
问题描述
如何在表格视图单元格之间添加这些分隔符或空格?
或者你只是使用两个不同的细胞?
解决方案
您可以添加部分页脚视图
代码:
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
let footerView = UIView(frame: CGRect(x: 0, y: 0, width: tableView.frame.size.width, height: 50))
return footerView
}
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 50
}
推荐阅读
- python - 如何迭代图表中的点?
- ios - Swift:后退按钮显示在情节提要中,但不显示在模拟器中
- java - 如何在 java 和 weblogic 12c 中正确执行相互身份验证?
- java - 在while循环中输入内容时如何解决索引超出范围的问题?
- ios - 滚动视图、集合视图和一页控件
- authentication - Silverstripe 3 允许控制器操作的基本身份验证
- python - Vsc 给出错误但 python idle doent 吗?
- python - django.contrib.auth.models.User.DoesNotExist:用户匹配查询不存在
- git - 使用具有相互依赖存储库的 git 子模块的巧妙方法
- sql-server - 如何使用尽可能少的查询(一个?)