设置 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];

posted on 2016-07-25 16:20  活最好的自己  阅读(934)  评论(0编辑  收藏  举报

导航