我试图找出一种方法,使我的单元格 selectedBackgroundView 大于单元格本身。
我的以下方法旨在制作 selectedBackgroundView:单元格的超级视图宽度(屏幕的整个宽度)X单元格的高度
UIView *bg = [[UIView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.superview.frame), CGRectGetHeight(cell.frame))];
bg.backgroundColor = [UIColor redColor];
cell.selectedBackgroundView = bg;
选择此单元格时,背景颜色仅在单元格的范围内扩展(不达到超级视图的高度)
我怎样才能最好地完成使 selectedBackgroundView 大于单元格?我在这里采取了完全错误的方法吗?