-(void)collectionView:(UICollectionView *)collectionView didDeselectItemAtIndexPath:(NSIndexPath *)indexPath
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
didDeselectItemAtIndexPath 是取消選擇點擊事件
didSelectItemAtIndexPath 是點擊事件
就是因為方法名稱太像了,每次didDeselectItemAtIndexPath點擊的都會選中上次點擊的按鈕
搞得我檢查了半天才把問題解決
這個坑爬的我是醉了