Created
January 2, 2018 10:13
-
-
Save paul1893/baa5feeec12965b1e643dd52347bd92a 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 dragInteraction(_ interaction: UIDragInteraction, itemsForBeginning session: UIDragSession) | |
| let itemProvider = NSItemProvider() | |
| itemProvider.registerFileRepresentation(forTypeIdentifier: kUTTypeJPEG as String, fileOptions: [.openInPlace], visibility: .all){ completionHandler in | |
| //Get Url | |
| let url = Attachement.url(forName: self.contactCard.name) | |
| completionHandler(url, true, nil) | |
| return nil | |
| } | |
| let dragItem = UIDragItem(itemProvider: itemProvider) | |
| return [dragItem] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment