collectionView关于点击事件

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

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

didDeselectItemAtIndexPath 是取消选择点击事件

didSelectItemAtIndexPath 是点击事件

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

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

这个坑爬的我是醉了

原文地址:https://www.cnblogs.com/fleas/p/5723844.html