[英]swift - UITableView section insets
You could have the cell's contentView
's backgroundColor
set to clear
and setup your UI elements however you want.您可以将单元格的contentView
的backgroundColor
设置为根据需要clear
和设置您的 UI 元素。 That way it'll look as if the cell is indented.这样它看起来好像单元格是缩进的。
Don't try to inset your whole TableView
/ TableViewCell
.不要试图插入整个TableView
/ TableViewCell
。 Create a container View inside your TableViewCell instead.而是在 TableViewCell 内创建一个容器视图。 And set margin for inner UIView
并为内部UIView
设置边距
Currently, you can't do it with UITableView.目前,你不能用 UITableView 做到这一点。 There is no API for section insets.部分插图没有 API。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.