我已经在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
}
但是,当我滑动行并显示操作按钮时,以及当我单击 滑动动作会触发我想要的动作,但永远不会将其隐藏。
请让我知道执行后如何隐藏动作?谢谢