Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iosdevie/948f83e8ea65c1863e490a7e06cc2e31 to your computer and use it in GitHub Desktop.
Save iosdevie/948f83e8ea65c1863e490a7e06cc2e31 to your computer and use it in GitHub Desktop.
func collectionView(_ collectionView: UICollectionView, willPerformPreviewActionForMenuWith configuration: UIContextMenuConfiguration, animator: UIContextMenuInteractionCommitAnimating) {
let id = configuration.identifier as! String
animator.addCompletion {
self.show(SecondViewController(index: Int(id)), sender: self)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment