gpt4 book ai didi

ios - 如何使用 Swift 中的 editActionsForRowAtIndexPath 检测单元格是否被滑动到正常状态?

转载 作者:行者123 更新时间:2023-11-29 01:09:02 24 4
gpt4 key购买 nike

我在一个单元格中添加了一些 Action :

override func tableView(tableView: UITableView, editActionsForRowAtIndexPath indexPath: NSIndexPath) -> [UITableViewRowAction]? {

let info = UITableViewRowAction(style: .Normal, title: "Info") { action, index in
// ...
}
info.backgroundColor = UIColor.lightGrayColor()

return [info]
}

我想检测用户何时点击单元格(而不是信息按钮)以便它滑动回到其原始位置。如何做到这一点?

最佳答案

看起来didEndEditingRowAtIndexPath可以完成这项工作。

关于ios - 如何使用 Swift 中的 editActionsForRowAtIndexPath 检测单元格是否被滑动到正常状态?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35985945/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com