以下是两种实现效果

 

1. 自定义cell 继承UITableViewCell  

 重写  

 

-(void)setSelected:(BOOL)selected animated:(BOOL)animated

{

 

}

 

-(void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated

}

里面不写任何东西 

注意重写的时候一定要有带animated 方法,不然还是无效

 

 

2.点击单元格 取消选中单元格

 

//  点击单元格的时候取消选中单元格

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

{

    [tableView deselectRowAtIndexPath:indexPath animated:YES];

}

 

相关文章:

  • 2022-12-23
  • 2021-11-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-04
  • 2022-12-23
猜你喜欢
  • 2021-09-22
  • 2021-08-06
  • 2021-11-18
  • 2022-12-23
  • 2022-12-23
  • 2021-11-11
相关资源
相似解决方案