-(void)collectionView:(UICollectionView *)collectionView didDeselectItemAtIndexPath:(NSIndexPath *)indexPath

- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath

 

didDeselectItemAtIndexPath 是取消选择点击事件

didSelectItemAtIndexPath 是点击事件

就是因为方法名称太像了,每次didDeselectItemAtIndexPath点击的都会选中上次点击的按钮

搞得我检查了半天才把问题解决 

这个坑爬的我是醉了

相关文章:

  • 2022-02-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-23
猜你喜欢
  • 2021-06-28
  • 2022-12-23
  • 2021-11-03
  • 2021-07-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案