我使用拖放来重新排列 collectionView。当我开始拖动时,我更改了 collectionView 可视化。要将它改回来,我需要一个在任何情况下都会执行的方法。现在,如果我开始拖动并立即释放触摸,则不会执行以下任何方法:
not this:
func collectionView(_ collectionView: UICollectionView, dragSessionDidEnd session: UIDragSession)
not this:
func collectionView(_ collectionView: UICollectionView, dropSessionDidEnd session: UIDropSession)
not this:
func collectionView(_ collectionView: UICollectionView, performDropWith coordinator: UICollectionViewDropCoordinator)
Run Code Online (Sandbox Code Playgroud)
谢谢你。