【发布时间】:2018-06-20 07:54:11
【问题描述】:
如何去除图片中的线条?我尝试了以下建议,但没有一个对我有用,
How do I remove the borders of a UITableView?
Remove separator line for only one cell
Hide separator line on one UITableViewCell
这是我在cellForRowAt中的当前代码:
if (indexPath.row == place_sections[indexPath.section].rows.count - 1) {
cell.separatorInset.left = 1000
//cell.layer.borderWidth = 0
//cell.separatorInset = UIEdgeInsetsMake(0, 160, 0, 160);
}
if (indexPath.row == 0) {
cell.separatorInset.left = 1000
//cell.layer.borderWidth = 0
//cell.separatorInset = UIEdgeInsetsMake(0, 160, 0, 160);
// self.tableview.tableFooterView = UIView(frame: CGRect(x: 0, y: 0, width: self.tableview.frame.width, height: 1))
}
谢谢
【问题讨论】:
-
你试过设置
tableView.separatorColor = tableView.backgroundColor吗?它不会删除分隔符,但它应该可以解决,因为您只想要可见的结果 -
阅读下面第一个答案的评论。这不是我想要的。
-
@marko calvocruz 我明白你的问题,我会尽力解决它...
标签: ios uitableview