【发布时间】:2021-05-31 11:29:04
【问题描述】:
如何仅以编程方式从 tableView 单元格中删除 顶行分隔符。
例如:
//remove top line seperator from cell 0
if indexPath.row == 0 {
cell.separatorInset = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: .greatestFiniteMagnitude)
}
删除顶部和底部的分隔线。我只想从顶部而不是底部删除分隔线。
我试过了,还是不行:
cell.separatorInset = UIEdgeInsets(top: .greatestFiniteMagnitude, left: 0, bottom: 0, right: 0)
cell.separatorInset.top = .greatestFiniteMagnitude
【问题讨论】:
标签: ios swift uitableview