-1

I subclassed UITableViewCell. Then, in my storyboard, I added an image to the superview. The image has constraints of:

left: 0
bottom: -5
width: 10
height: 10

The reason I put -5 as the bottom constraint is because I want it to cover the separator line.

However, in this solution, the image goes underneath the line instead of over it.

TIMEX
  • 259,804
  • 351
  • 777
  • 1,080

1 Answers1

3

Since the separator view and cell's content view are at the same level in the view hierarchy you could use bringSubviewToFront to display the content view over the separator, however this might cover it if you use a background color for the contentView. All you have to do is set

cell.bringSubviewToFront(cell.contentView)

in cellForRowAtIndexPath. If this does not suit your needs you can always implement your own custom cell with a custom separator.

Jelly
  • 4,522
  • 6
  • 26
  • 42