iOS关于tableViewcell的选中状态颜色

网上的设置背景颜色跟背景图片不好使了,这个是改系统的方法,在选中是调用,改变背景色


-(void)tableView:(UITableView*)tableView didSelectRowAtIndexPath:(NSIndexPath*)indexPath

{

UITableViewCell*cell = [_leftTableViewcellForRowAtIndexPath:indexPath];

cell.backgroundColor= [UIColor whiteColor];

}

- (void)tableView:(UITableView*)tableView didDeselectRowAtIndexPath:(NSIndexPath*)indexPath

{

UITableViewCell*cell = [_leftTableViewcellForRowAtIndexPath:indexPath];

cell.backgroundColor= [UIColor redColor];

}

}

你可能感兴趣的:(iOS关于tableViewcell的选中状态颜色)