UITableViewCell选中UILabel背景色消失
解决办法
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
//自己的label及自己要设置的label背景色
self.messageLabel.backgroundColor = [UIColor redColor] ;
}
- (void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated {
[super setHighlighted:highlighted animated:animated];
//自己的label及自己要设置的label背景色
self.messageLabel.backgroundColor = [UIColor redColor] ;
}
cell.selectionStyle = UITableViewCellSelectionStyleNone;
本文标题:UITableViewCell选中UILabel背景色消失
本文链接:https://www.haomeiwen.com/subject/yttljqtx.html
网友评论