I have a grouped tableview and I am trying to set a border for each section in the tableview. The sections have different row count. The ones that have one row I use this code and it works great:
layer.masksToBounds = true
layer.cornerRadius = 3
layer.borderWidth = 1
let borderColor: UIColor = .black
layer.borderColor = borderColor.cgColor
I use custom cells.
The problem is when I have more than one row, each cell have its own border and I want to make the border only around the section. Any suggestions?
Thank you
Update:
here a screenshot for better explanation : screenshot
the problem is with the section that has multiple rows I want the border to wrap that section.