Last active
January 2, 2018 13:17
-
-
Save paul1893/c5eb9d85ee01c1cfc68d78faa584c887 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, previewForLifting item:UIDragItem, session:UIDragSession) -> UITargetedDragPreview? { | |
| let imageView = UIImageView(image: UIImage(named: "MyDragImage")) | |
| let dragView = interaction.view! | |
| let dragPoint = session.location(in: dragView) | |
| let target = UIDragPreviewTarget(container: dragView, center: dragPoint) | |
| return UITargetedDragPreview(view: imageView, parameters:UIDragPreviewParameters()) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment