Skip to content

Instantly share code, notes, and snippets.

@icanswiftabit
Created November 16, 2017 10:30
Show Gist options
  • Save icanswiftabit/88cf5deb4e076b80ab46031316111fda to your computer and use it in GitHub Desktop.
Save icanswiftabit/88cf5deb4e076b80ab46031316111fda to your computer and use it in GitHub Desktop.
func collectionView(_ collectionView: UICollectionView, dropSessionDidUpdate session: UIDropSession, withDestinationIndexPath destinationIndexPath: IndexPath?) -> UICollectionViewDropProposal {
let operation: UIDropOperation = session.localDragSession == nil ? .copy : .move
let intent = UICollectionViewDropIntent.insertAtDestinationIndexPath
let dropProposal = UICollectionViewDropProposal(operation: operation, intent: intent)
return dropProposal
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment