再UITableViewCell添加如下方法

- (void)changeSelectedColor
{
    self.contentView.backgroundColor = [UIColor lightGrayColor];
    
    self.bgView.backgroundColor = UIColorWithRGB(0xf3, 0xf3, 0xf3);
    
    UIView *backView = [[UIView alloc] initWithFrame:self.frame];
    self.selectedBackgroundView = backView;
    self.selectedBackgroundView.backgroundColor = [UIColor grayColor];
    [backView release];
}

 

相关文章: