当前cell的自定义背景颜色
BMMineTableViewCell *cell = [_tableView dequeueReusableCellWithIdentifier: BMMineTVCellIdentifier];
cell.selectedBackgroundView = [[UIView alloc] initWithFrame:cell.frame];
cell.selectedBackgroundView.backgroundColor = BMColor(@"#f0f5f7");
return cell;
Cell点击后选中的颜色消失
//cell点击,在代理方法中写
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
//点击后cell的选中颜色消失
[self performSelector:@selector(delectCellColor:) withObject:nil afterDelay:0.5];
}
//cell的选中颜色消失
- (void)delectCellColor:(id)sender{
[self.tableView deselectRowAtIndexPath:[self.tableView indexPathForSelectedRow] animated:YES]