【问题标题】:tableView:didSelectRowAtIndexPath: doesn't get called when deselecting a row when using setAllowsMultipleSelectionDuringEditingtableView:didSelectRowAtIndexPath:在使用 setAllowsMultipleSelectionDuringEditing 时取消选择行时不会被调用
【发布时间】:2012-02-16 19:18:22
【问题描述】:

我使用setAllowsMultipleSelectionDuringEditing 允许在编辑模式下选择多行。我想知道何时选择了一行,所以我使用tableView:didSelectRowAtIndexPath:,它工作正常。

但是,我想知道何时取消选择这些行之一,但这样做时不会调用 tableView:didSelectRowAtIndexPath:。有什么方法可以知道某行何时被取消/取消选择?

【问题讨论】:

    标签: ios cocoa-touch uitableview ios5


    【解决方案1】:

    如果你检查UITableViewDelegate Protocol Reference,你会发现一个名为tableView:didDeselectRowAtIndexPath:的方法。

    【讨论】:

    • 哇,我真笨。由于某种原因,我没有查看代表参考,所以我没有发现它。谢谢!
    猜你喜欢
    • 2019-04-21
    • 1970-01-01
    • 2013-10-23
    • 1970-01-01
    • 1970-01-01
    • 2017-12-30
    • 2013-12-02
    • 2020-10-23
    • 2010-09-22
    相关资源
    最近更新 更多