Remove separator line for only one cell

后端 未结 13 2110
萌比男神i
萌比男神i 2020-12-30 19:38

I\'m trying to remove the separator for one UITableViewCell. I did the following:

- (UITableViewCell *)tableView:(UITableView *)tableView cellFo         


        
相关标签:
13条回答
  • 2020-12-30 20:07

    Swift 5.1 -

    override public func layoutSubviews() {
        super.layoutSubviews()
        subviews.forEach { (view) in
            if type(of: view).description() == "_UITableViewCellSeparatorView" {
                view.isHidden = true
            }
        }
    }
    
    0 讨论(0)
提交回复
热议问题