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/465acf4eee7c3276ac99417d24c794f6 to your computer and use it in GitHub Desktop.
Save iosdevie/465acf4eee7c3276ac99417d24c794f6 to your computer and use it in GitHub Desktop.
func collectionView(_ collectionView: UICollectionView, contextMenuConfigurationForItemAt indexPath: IndexPath, point: CGPoint) -> UIContextMenuConfiguration? {
let configuration = UIContextMenuConfiguration(identifier: "\(indexPath.row)" as NSCopying, previewProvider: {
return SecondViewController(index: indexPath.row)
}){ action in
//add your uimenu as earlier
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment