I'm deleting a row from UITableView with RowAnimation .left which should be very simple
by writing the following
tableView.deleteRows(at: [indexPath], with: .left), but here comes the problem the UITableView doesn't respect the rowAnimation I'm passing (left, right,top,bottom,fade), it only show the normal animation
I have tried different solutions like
beginUpdates()
deleteRows(at: indexPath, with: .left)
endUpdates()
CATransaction.begin()
CATransaction.setCompletionBlock({
self.tableView.beginUpdates()
self.myViewModel?.items?.remove(at: indexPath.row)
self.tableView.deleteRows(at: [indexPath], with: UITableViewRowAnimation.top)
self.tableView.endUpdates()
})
self.tableView.setEditing(false, animated: true)
CATransaction.commit()
self.tableView.beginUpdates()
// ...
self.tableView.endUpdates()
self.tableView.layer.removeAllAnimations()
I have also tried to use performBatchUpdates, im pretty sure its kind of bug since it was working in previous versions of iOS, im using iOS 13 & swift 5
There are a few other answers like Question1, but none of them are working