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

posted @ 2016-11-29 15:01  一人前行  阅读(648)  评论(0编辑  收藏  举报