设置 tableview 的背景颜色,总是不生效

1.只设置了背景图片,却忘记了取消掉 cell 的背景颜色(可以通过层次结构来观察)

    UIImageView *bgView = [[UIImageView alloc]initWithFrame:self.bounds];

    bgView.image = [UIImage imageNamed:@"goddess_menu_bg"];

    self.backgroundView = bgView;

2.应在创建 cell 时添加一句,

        cell.backgroundColor = [UIColor clearColor];

原文地址:https://www.cnblogs.com/lz465350/p/5703970.html