Grouped UITableview remove outer separator line

前端 未结 19 2232
遇见更好的自我
遇见更好的自我 2020-12-02 10:58

I have a grouped UITableview which is created programatically. Also I have a cell with xib file populated in tableview programmatically as well. So far so good. But I want t

19条回答
  •  感动是毒
    2020-12-02 11:46

    You can remove separators even in grouped UITableView with Static Cell:

    class CustomCell: UITableViewCell {
    
    override func layoutSubviews() {
        super.layoutSubviews()
        for view in subviews where view != contentView {
            view.removeFromSuperview()
        }
    }
    

提交回复
热议问题