This is the .m file of my UITableViewCell.
#import "ContentCardTableViewCell.h" #import <QuartzCore/QuartzCore.h> @implementation ContentCardTableViewCell - (void)awakeFromNib { // Initialization code [self setBackgroundColor:[UIColor clearColor]]; } - (void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated { [super setHighlighted:highlighted animated:animated]; if (highlighted) { [self setBackgroundColor:[UIColor clearColor]]; // Recover backgroundColor of subviews. } } - (void)setSelected:(BOOL)selected animated:(BOOL)animated { [super setSelected:selected animated:animated]; if (selected) { [self setBackgroundColor:[UIColor clearColor]]; // Recover backgroundColor of subviews. } } @end
But one view in this UITableViewCell disappears when selected. I tried this and this and much more, but nothing helped. Is something missing?
user4961101
source share