I am trying to figure out a way to make my selectedBackgroundView of a cell, larger than the cell itself.
My following approach aims to make the selectedBackgroundView: the cell's superview width (the entire width of the screen) X the cell's height
UIView *bg = [[UIView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.superview.frame), CGRectGetHeight(cell.frame))];
bg.backgroundColor = [UIColor redColor];
cell.selectedBackgroundView = bg;
When this cell is selected, the background color only extends within the cell's limits (not up to the superview's height)
How can I best accomplish making the selectedBackgroundView larger than the cell? Am I taking the complete wrong approach here?
as I tested,
selectedBackgroundView
's frame is constant, yourbg
's width change does not work.