UITableView如何在执行操作后删除Swipe操作

时间:2019-05-24 09:30:04

标签: ios swift uitableview

我已经在UITableView中实现了以下操作

 @available(iOS 11.0, *)
func tableView(_ tableView: UITableView, leadingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration? {



    let configuration = UISwipeActionsConfiguration(actions: createLeftSwipeActionList(indexPath: indexPath))
    configuration.performsFirstActionWithFullSwipe = false

    return configuration
}

func tableView(_ tableView: UITableView, trailingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration? {

    let configuration = UISwipeActionsConfiguration(actions: createRightSwipeActionList(indexPath: indexPath))
    configuration.performsFirstActionWithFullSwipe = false

    return configuration
}

但是,当我滑动行并显示操作按钮时,以及当我单击 滑动动作会触发我想要的动作,但永远不会将其隐藏。

请让我知道执行后如何隐藏动作?谢谢

0 个答案:

没有答案