在如下方法中设置:
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
if (selected) {
self.textLabel.textColor = LightRedColor;
}else
{
self.textLabel.textColor = App_BackgroundColor;
}
// Configure the view for the selected state
}
并且 不要写如下语句:
[tableView deselectRowAtIndexPath:indexPath animated:YES];