Created
January 2, 2018 12:54
-
-
Save paul1893/9516816ecaa36adea083cf607d0cee05 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) -> [UIDragItem] { | |
let image:UIImage = getImage() | |
let provider = NSItemProvider(object: image) | |
let item = UIDragItem(itemProvider: provider) // Build your drag item | |
item.localObject = image | |
return [item] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment