gpt4 book ai didi

ios - 启用-tableView :commitEditingStyle:forRowAtIndexPath for only specific cell

转载 作者:塔克拉玛干 更新时间:2023-11-02 09:06:35 24 4
gpt4 key购买 nike

通常,当您定义-tableView:commitEditingStyle:forRowAtIndexPath时,您可以通过滑动将所有单元格切换到编辑模式。
但是,我只想为特定的单元格启用 -tableView:commitEditingStyle:forRowAtIndexPath
这可能吗?

最佳答案

tableview还有一个delegate方法

tableView:canEditRowAtIndexPath:

您可以在其中定义特定索引路径的行是否可以编辑。

希望这对您有所帮助。

关于ios - 启用-tableView :commitEditingStyle:forRowAtIndexPath for only specific cell,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30180444/

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