I am developing app support iOS9 & iOS 10 and later I want to Add edit actions to table view rows I know it's been possible since iOS 8 but only on the right (trailing) side. The new style swipe actions added in iOS 11 both sides.
But my question is there any way to swipe cell from the left in iOS9 & iOS 10
here is the add action before ios 11
override func tableView(_ tableView: UITableView,
editActionsForRowAt indexPath: IndexPath)
-> [UITableViewRowAction]? {
let deleteTitle = NSLocalizedString("Delete", comment: "Delete action")
let deleteAction = UITableViewRowAction(style: .destructive,
title: deleteTitle) { (action, indexPath) in
self.dataSource?.delete(at: indexPath)
}
return [deleteAction]
}
And for iOS 11+
override func tableView(_ tableView: UITableView,
leadingSwipeActionsConfigurationForRowAt indexPath: IndexPath)
-> UISwipeActionsConfiguration? {
}
other side
override func tableView(_ tableView: UITableView,
trailingSwipeActionsConfigurationForRowAtIndexPath indexPath: IndexPath)
-> UISwipeActionsConfiguration? {
}
