这是我的UITableViewCell的.m文件.
#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
但是这个UITableViewCell中的一个视图在选择时消失了.我尝试了this和this以及更多但没有任何帮助.有什么我想念的吗?