在UITableView的Delegate方法里写上:spa
- (void) tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath3d
{orm
cell.selectionStyle = UITableViewCellSelectionStyleDefault;//先选择默认的选择样式
it
cell.selectedBackgroundView = [[UIView alloc] initWithFrame:cell.frame];io
cell.selectedBackgroundView.backgroundColor =[UIColor redColor](自定义的颜色);table
}select