需要同时设置高亮与选中状态,先高亮后选择
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
if (selected) {
self.contentView.backgroundColor = QBBackColor;
}
}
- (void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated {
[super setHighlighted:highlighted animated:animated];
if (highlighted) {
self.contentView.backgroundColor = QBBackColor;
}
}