views:

40

answers:

1

I have a UITableView cell with an image that spans the full height of the cell.

If I do not use a separator the images on each cell join up and appear as a single image, however, when I turn on the separator the image is sliced (see below). Is there a way to make the image appear on top of the table view separator?

alt text

+1  A: 

I would just get rid of the standard separator and manually draw a line beneath the image. This will probably simulate the separator quite nicely without it overlapping the image.

Perhaps just use an UIImageView with a stretched line image?

Rengers
Thanks for the idea, but this line is only drawn on the cells that have data, which means that for a small number of rows you end up with a large empty area with no lines
Liam
If the line is beneath your image, and spans entire length of the cell, it will be visible when your image is not shown for cells with no data..
lukya
Exactly, just add the image of the line to all the cells and it will display in all the cells, even if there is no data in it.
Rengers
For the line to be drawn, the cellForRowAtIndexpath will need to be called for each cell. The empty area that I mean are the other rows without data in them. If what you mean is that I fake the drawing of cells so that the view fills up with 'data' cells and 'line' cells, it's not exactly what I was looking for. I was hoping that there is some way to draw the image 'on top' of the line
Liam