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 on selection. I have tried this and this and many more but nothing helped. Is there something I am missing?