Created
November 10, 2017 12:21
-
-
Save pgpt10/c63a02b27b0807d4b0e9d3fe672cf3b0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func collectionView(_ collectionView: UICollectionView, itemsForAddingTo session: UIDragSession, at indexPath: IndexPath, point: CGPoint) -> [UIDragItem] | |
{ | |
let item = self.items[indexPath.row] | |
let itemProvider = NSItemProvider(object: item as NSString) | |
let dragItem = UIDragItem(itemProvider: itemProvider) | |
dragItem.localObject = item | |
return [dragItem] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment