UITableViewCell subview backgrou

2018-09-12  本文已影响3人  Fintecher

颜色或失效,重新UITableViewCell的方法,重新设置背景色

- (void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated{
    
    UIColor *backgroundColor = self.tagView.backgroundColor;
    [super setHighlighted:highlighted animated:animated];
    self.yourView.backgroundColor = backgroundColor;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated{
    
    UIColor *backgroundColor = self.tagView.backgroundColor;
    [super setSelected:selected animated:animated];
    self.yourView.backgroundColor = backgroundColor;
}

上一篇 下一篇

猜你喜欢

热点阅读