UICollectionView-Sort icon indicating copy to clipboard operation
UICollectionView-Sort copied to clipboard

少了一句代码

Open chaoshenglu opened this issue 8 years ago • 3 comments

针对iOS9以下,手势改变后。[self collectionView:self.collectionView itemAtIndexPath:oldIndexPath willMoveToIndexPath:currentIndexPath];

chaoshenglu avatar Jul 05 '16 03:07 chaoshenglu

@lx271896700 针对iOS9以下,我这句会自动调用你所说的方法。 //移动 会调用willMoveToIndexPath方法更新数据源 [self.collectionView moveItemAtIndexPath:oldIndexPath toIndexPath:currentIndexPath];

CarrySniper avatar Jul 06 '16 01:07 CarrySniper

可是我得同时写这两句代码才行: [self.collectionView moveItemAtIndexPath:oldIndexPath toIndexPath:currentIndexPath]; [self collectionView:self.collectionView itemAtIndexPath:oldIndexPath willMoveToIndexPath:currentIndexPath];

chaoshenglu avatar Jul 06 '16 02:07 chaoshenglu

@lx271896700 我iOS8是使用ipad真机和iPhone 5s (8.1)的模拟器,是可以的。加上一句应该没影响,少一句可能就出现你这种状况……

CarrySniper avatar Jul 06 '16 02:07 CarrySniper