Как изменить высоту действия ячейки Tableview? - PullRequest
0 голосов
/ 05 февраля 2020

Я создал пользовательский TableViewCell и добавил его для удаления

Swipe Action. Я хочу изменить высоту действия в зависимости от высоты пользовательской ячейки

enter image description here

func tableView(_ tableView: UITableView, trailingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration? {
    let contextItem = UIContextualAction(style: .destructive, title: "Delete") {  (contextualAction, view, boolValue) in
        self.array.remove(at: indexPath.row)
        self.tableView.deleteRows(at: [indexPath], with: .automatic)
        boolValue(true)
        self.tableView.reloadData()
    }
    let swipeActions = UISwipeActionsConfiguration(actions: [contextItem])

    return swipeActions
}

func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
    return true
}
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...