1

I am trying to delete a single separator in a tableView. I have annotated the screenshot below to show this. I am wanting to delete the first cells top separator. My top text & search bar is in the tableView's header. How would I achieve this?

enter image description here

Let's_Create
  • 2,963
  • 3
  • 14
  • 33
mink23
  • 144
  • 1
  • 12

3 Answers3

1

Please try with this code

Original answer for this code is @Avinash

For mode detail please check avinash answer

if indexPath.row == {your row number} {
    cell.separatorInset = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: .greatestFiniteMagnitude)
}
Vivek
  • 4,916
  • 35
  • 40
0

Add a separator view (UIView) as part of your Custom cell. From the nib make the separator for UITableView to none.

0

tblView.separatorStyle = .none

kartik patel
  • 496
  • 1
  • 4
  • 15