Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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