I am trying to add accessibility ID to 2 buttons(Delete, Add) which is present in table view row when swipe left. The accessibilityIdentifier is not auto populating for deleteAction when I try to add it. Can somebody take a look.Thank you in advance
func tableView(_ tableView: UITableView, trailingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration? {
var contextualAction: [UIContextualAction] = []
// 1st button
let deleteAction = UIContextualAction(style: .normal , title: "DELETE") {
(action, view, handler) in
// code to remove item
}
contextualAction.append(deleteAction)
// 2nd button
let addAction = UIContextualAction(style: .normal , title: "Add") { (action,
view, handler) in
// code to add item
}
contextualAction.append(addAction)
let swipeAction = UISwipeActionsConfiguration(actions: contextualAction)
swipeAction.performsFirstActionWithFullSwipe = false
return swipeAction
}