UICollectionView-Sort
UICollectionView-Sort copied to clipboard
少了一句代码
针对iOS9以下,手势改变后。[self collectionView:self.collectionView itemAtIndexPath:oldIndexPath willMoveToIndexPath:currentIndexPath];
@lx271896700 针对iOS9以下,我这句会自动调用你所说的方法。 //移动 会调用willMoveToIndexPath方法更新数据源 [self.collectionView moveItemAtIndexPath:oldIndexPath toIndexPath:currentIndexPath];
可是我得同时写这两句代码才行: [self.collectionView moveItemAtIndexPath:oldIndexPath toIndexPath:currentIndexPath]; [self collectionView:self.collectionView itemAtIndexPath:oldIndexPath willMoveToIndexPath:currentIndexPath];
@lx271896700 我iOS8是使用ipad真机和iPhone 5s (8.1)的模拟器,是可以的。加上一句应该没影响,少一句可能就出现你这种状况……