【发布时间】:2015-06-08 10:38:01
【问题描述】:
这是我的 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 等等,但没有任何帮助。有什么我遗漏的吗?
【问题讨论】:
标签: ios objective-c iphone uitableview