collectionView关于点击事件


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

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

 

didDeselectItemAtIndexPath 是取消选择点击事件

didSelectItemAtIndexPath 是点击事件

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

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

这个坑爬的我是醉了


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM