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