Search code examples
iosuitableviewcellseparator

Increase height of UITableViewCell separator


I have subclassed and colored tableview cells in a tableview that is on a view with an image. What I need to do is increase the height of the cell separators. I know this has been asked before, but the difference is that I cannot add a view at the bottom of my cells because I need the area to be transparent so I can see the image under the tableview. Each cell is populated with data from CoreData.

Is there any way to increase the height of the tableview separators without simply creating a blank 'filler' cell between each populated cell, or creating a new section with a footer for each cell?

Basically, what I need is a new Cell Separator Style similar to UITableViewCellSeparatorStyleSingleLine but more than a single line. Is this possible?


Solution

  • Typically, we will add a image view as the background view of the table cell. An example of the image is: a three pixel height image, 2 pixel transparent and 1 pixel black, which will be stretched as the separator.