gpt4 book ai didi

ios - 如何隐藏 UITableView 中某些单元格的多选编辑 GUI?

转载 作者:行者123 更新时间:2023-11-29 01:20:15 26 4
gpt4 key购买 nike

我正在使用 UITableView,将编辑设置为 true,并在界面构建器中使用这些选项:

enter image description here

这显示了一个不错的选择 UI,我可以修改它的样式和我可以对其使用react的事件:

enter image description here

我想关闭它,但仅限于某些单元格。我看过this和许多类似的问题,但它们指的是 UITableView 中不同类型的选择。 UITableViewCellSelectionStyle.NonewillSelectRowAtIndexPath 不允许我阻止这种类型的选择。

最佳答案

你有没有尝试实现

func tableView(_ tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -> Bool

在你的委托(delegate)中?

我相信它会让你获得你想要达到的结果。

关于ios - 如何隐藏 UITableView 中某些单元格的多选编辑 GUI?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34699458/

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