美文网首页
UITableViewCell subview backgrou

UITableViewCell subview backgrou

作者: Fintecher | 来源:发表于2018-09-12 12:10 被阅读3次

颜色或失效,重新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;
}

相关文章

网友评论

      本文标题:UITableViewCell subview backgrou

      本文链接:https://www.haomeiwen.com/subject/chrvgftx.html