改变UITableViewCell按下去的颜色

来源:互联网 发布:mplayerx mac 下载 编辑:程序博客网 时间:2024/05/24 16:15
UIView *bgColorView = [[UIView alloc] init];[bgColorView setBackgroundColor:[UIColor redColor]];[cell setSelectedBackgroundView:bgColorView];[bgColorView release];


当点击cell的时候,下面代码可以取消长期按压灰色的状态

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{    [tableView deselectRowAtIndexPath:indexPath animated:YES];}



0 0
原创粉丝点击