The two APIs seem to get the same result. In which case is it better to use one over the other?
override func tableView(_ tableView: UITableView, editActions
It does basically the same, but swipe actions are available since iOS 11 was released and have some new features:
action.image = UIImage(...)
. If there is enough space it shows image as well as title
Also, you should use swipe actions because they are preferred and in the future updates UITableViewRowActions
will be deprecated how UITableView
header comment can tell us:
Use -
tableView:trailingSwipeActionsConfigurationForRowAtIndexPath:
instead of this method, which will be deprecated in a future release.