1

I have a UITableView with 2 static cells:

TableView

And I would like to remove the second separator because it is ugly. I found lots of articles abuot that theme but non of them worked on iOS 9. (eg. mySecondCell.separatorInset = UIEdgeSeparatorInsetsMake(0, 0, 0, 999)

EDIT:

Thanks for the footer idea, it worked. I just dropped it in and set the height to 0, and the color to default.

schoeberlt
  • 167
  • 11
  • Try adding `mySecondCell.layoutMargins = UIEdgeInsetsZero` prior to the `UIEdgeSeparatorInsetsMake`. Alternatively, have a look at the `UIView` "footer" solution [as explained here](http://stackoverflow.com/questions/1369831/eliminate-extra-separators-below-uitableview-in-iphone-sdk/5377569#5377569). – dfrib Feb 07 '16 at 13:02
  • try this..http://stackoverflow.com/a/25877725/5362916 – Uma Madhavi Feb 07 '16 at 13:02
  • Wow, the footer thing worked, thanks! – schoeberlt Feb 07 '16 at 13:09

1 Answers1

0

I usually disable the separators and add my own UIViews in cellForRowAtIndexPath. That works most reliably and don't have to fix this in every new iOS version.

Tapani
  • 3,191
  • 1
  • 25
  • 41