You could have the cell's contentView
's backgroundColor
set to clear
and setup your UI elements however you want. That way it'll look as if the cell is indented.
Don't try to inset your whole TableView
/ TableViewCell
. Create a container View inside your TableViewCell instead. And set margin for inner UIView
Currently, you can't do it with UITableView. There is no API for section insets.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.