Skip to content

Instantly share code, notes, and snippets.

@pgpt10
Created November 2, 2017 12:11
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 pgpt10/a481408542586b09fd7c4ebf4ed69ece to your computer and use it in GitHub Desktop.
Save pgpt10/a481408542586b09fd7c4ebf4ed69ece to your computer and use it in GitHub Desktop.
func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath) -> [UITableViewRowAction]?
{
let deleteAction = UITableViewRowAction(style: .destructive, title: "Delete") { (action, indexpath) in
print("Delete Action Tapped")
}
deleteAction.backgroundColor = .red
return [deleteAction]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment