iOS点击cell时,控件背景色消失的解决方法

同时调用一下两个方法:

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    self.quickProfessionLabel.backgroundColor = UIColorFromRGB(0xce0f32);
    self.quickUnReadLabel.backgroundColor = UIColorFromRGB(0xce0f32);
}


- (void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated {
    
    [super setHighlighted:highlighted animated:animated];
    
    self.quickProfessionLabel.backgroundColor = UIColorFromRGB(0xce0f32);
    self.quickUnReadLabel.backgroundColor = UIColorFromRGB(0xce0f32);
    
}

http://blog.sina.com.cn/s/blog_134451adb0102wcsv.html

原文地址:https://www.cnblogs.com/lyz0925/p/6113677.html