Skip to content

Instantly share code, notes, and snippets.

@paul1893
Last active January 4, 2018 12:19
Show Gist options
  • Save paul1893/d52248ef2b61ee3424c5cfa149b18353 to your computer and use it in GitHub Desktop.
Save paul1893/d52248ef2b61ee3424c5cfa149b18353 to your computer and use it in GitHub Desktop.
func collectionView(_ collectionView: UICollectionView, dropSessionDidUpdate session: UIDropSession, withDestinationIndexPath destinationIndexPath: IndexPath?) -> UICollectionViewDropProposal {
if session.localDragSession != nil {
return UICollectionViewDropProposal(operation: .move, intent: .insertAtDestinationIndexPath)
} else {
return UICollectionViewDropProposal(operation: .copy, intent: .insertAtDestinationIndexPath)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment