Skip to content

Instantly share code, notes, and snippets.

@pgpt10
Created November 2, 2017 12:16
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/8a6d7c5a68bc06c471ce475cdc72b4e1 to your computer and use it in GitHub Desktop.
Save pgpt10/8a6d7c5a68bc06c471ce475cdc72b4e1 to your computer and use it in GitHub Desktop.
@available(iOS 11.0, *)
func tableView(_ tableView: UITableView, trailingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration?
{
let deleteAction = UIContextualAction(style: .destructive, title: "Delete") { (action, view, handler) in
print("Delete Action Tapped")
}
deleteAction.backgroundColor = .red
let configuration = UISwipeActionsConfiguration(actions: [deleteAction])
configuration.performsFirstActionWithFullSwipe = false //HERE..
return configuration
}
@Chris0123
Copy link

The most fxxking garbage!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment