I have a UITableView
with custom background images in each cell. The bottom cell has a taller image that the rest, because it contains a shadow. That means I have to extend the height of the last cell in a section to be taller than normal.
When I do this, the contents of the UITableViewCell
look like they are resting at the bottom of the cell instead of the middle (because the visual cell is shorter than the actual cell). Is there a way that I can position my content from the top instead of the center, and not have the UITableViewCell
resize it when a cell becomes the bottom cell (due to deleting or whatever)?
Setting the autoresizing mask on the labels to have a static top boundary doesn't work, nor does turning off autoresizesSubviews
on the cell.
I also thought about simply making all the cells the same height and turning off clipsToBounds
on the background image, except the background image is a stretchable image both horizontally and vertically, and needs to be able to resize based on the height of the contents of the cell.
Any other ideas that don't involve a hackish method?