Skip to content

Instantly share code, notes, and snippets.

@iosdevie
Created May 29, 2021 19:44
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/071483924a0a3a52bc85e88b9cff2457 to your computer and use it in GitHub Desktop.
Save iosdevie/071483924a0a3a52bc85e88b9cff2457 to your computer and use it in GitHub Desktop.
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if let movie = dataSource.itemIdentifier(for: indexPath) {
var currentSnapshot = dataSource.snapshot()
currentSnapshot.deleteItems([movie])
dataSource.apply(currentSnapshot)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment