I am using a custom table view cell for my tableview. For setting the border, I have put a view on the custom cell and I am changing its border properties.
s
You can use Objective-C
[cell.contentView.layer setBorderColor:[UIColor blackColor].CGColor]; [cell.contentView.layer setBorderWidth:2.0f];
Swift 5
cell.layer.borderColor = UIColor.black.cgColor cell.layer.borderWidth = 2.0
Hope it helps you.