Skip to content

Instantly share code, notes, and snippets.

@CibelePaulinoAndrade
Created July 26, 2018 13:36
Show Gist options
  • Save CibelePaulinoAndrade/64b62d85700b12b048cb99b0994b5089 to your computer and use it in GitHub Desktop.
Save CibelePaulinoAndrade/64b62d85700b12b048cb99b0994b5089 to your computer and use it in GitHub Desktop.
//Habilitando interações
dragImageView.isUserInteractionEnabled = true
dropImageView.isUserInteractionEnabled = true
dragTextView.isUserInteractionEnabled = true
dropTextView.isUserInteractionEnabled = true
//Adicionando interações de Drag
let dragImageInteraction = UIDragInteraction(delegate: self)
let dragTextInteraction = UIDragInteraction(delegate: self)
dragImageView.addInteraction(dragImageInteraction)
dragTextView.addInteraction(dragTextInteraction)
//Adicionando interações de Drop
let dropImageInteraction = UIDropInteraction(delegate: self)
let dropTextInteraction = UIDropInteraction(delegate: self)
dropImageView.addInteraction(dropImageInteraction)
dropTextView.addInteraction(dropTextInteraction)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment