I have a UITableView
with custom tableview cells with the separator line between each cell. I recently began implementing multi cell selection when in editing mode. In order to have the blue circled checkmarks when each cell is selected, I changed cell selectionStyle
from UITableViewCellSelectionStyleNone
to UITableViewCellSelectionStyleDefault
. To get rid of the gray shade when the cell is selected I just implemented a white background like this:
UIView * cellBackgroundView = [[UIView alloc] initWithFrame:cell.frame];
cellBackgroundView.backgroundColor = [UIColor clearColor];
cell.multipleSelectionBackgroundView = cellBackgroundView;
cell.selectedBackgroundView = cellBackgroundView;
The problem is that when I'm not in edit mode, the separator line disappears whenever the cell is selected, but when I select a cell in edit mode, the line remains. Any idea how to resolve this so the separator always remains?
cellBackgroundView
will overlap separator lines. Check with removing it. – Kampai Nov 25 '14 at 6:40cellBackgroundView.frame.size.height
by quite a bit and it was still occurring. Also, that wouldn't explain why its only happening when I select a cell when I'm not in edit mode. The lines remain when I select a cell while in edit mode. – Brosef Nov 25 '14 at 6:53