Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
func tableView(_ tableView: UITableView, willPerformPreviewActionForMenuWith configuration: UIContextMenuConfiguration, animator: UIContextMenuInteractionCommitAnimating) {
guard let identifier = (configuration.identifier as? NSString) as String? else { return }
let task = tasks.first { $0.id == identifier }
if task != nil {
animator.addCompletion {
let previewController = TaskPreviewController()
previewController.task = task
self.show(previewController, sender: self)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment