Last active
January 2, 2018 09:56
-
-
Save paul1893/2b8ad4a34d4819656481c5c60e117bfe 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 tableView(_ tableView: UITableView, itemsForAddingTo session: UIDragSession, at indexPath: IndexPath, point: CGPoint) -> [UIDragItem] { | |
| // Return an empty array to handle the tap normally or array to add items already got from itemsForBeginning | |
| let image = arrImg[indexPath.row] | |
| let provider = NSItemProvider(object: image as NSItemProviderWriting) | |
| let item = UIDragItem(itemProvider: provider) | |
| item.localObject = image | |
| return [item] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment