0
votes

I have a tableview with a transparent background, and a content offset to allow part of a background image to be visible at the top of the first cell. The content offset is set with: accordianTableView.contentInset = UIEdgeInsetsMake(100, 0, 0, 0)

As shown in the following image, the green highlighted rectangle is the first cell of the tableview, which has a solid white background. The cell is in edit mode, but there is a transparent section when the cell is dragged to the right, where the background image is visible through the cell even though it has a white background...

I cannot have the background of the table view solid white, since this would cause the background image to be totally invisible through the table view.

How can I make the entire cell background always white, even when dragged to the right while editing?

IOS TableView Cell

1
if you want to show image on top of the tableView, why not use the tableView.tableHeaderView? If you want it to stick to the top of the view with the cells, then add it to first section as section view - Tj3n
That's not the effect I'm trying to achieve. The image is being animated, and therefore cannot be part of the tableview. - Warrick
Why it cant be a part of the tableView? can you explain more the image get animated? - Tj3n
Because I need to move the image around myself, not managed through the tableview. - Warrick

1 Answers

0
votes

Worked around the issue by adding an empty UIView behind the tableview, and changing its position to always be behind the tableview - providing a background color for the cells while in edit mode.