iphone - tableView 的 commitEditingStyle 并知道何时点击 'Done' 按钮

标签 iphone uitableview

我的 Controller 继承自 UITableViewController,并将左按钮分配给“editButtonItem”。我如何知道用户在发出他们想要的所有删除后何时点击了“完成”按钮?

self.navigationItem.leftBarButtonItem = self.editButtonItem;

我正在实现

- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath 

通过此功能,我可以看到表中每个项目何时发生删除,但我还想知道何时点击“完成”按钮。

最佳答案

事实证明我需要重写:

- (void)setEditing:(BOOL)editing animated:(BOOL)animated 

这会告诉我编辑何时结束。

关于iphone - tableView 的 commitEditingStyle 并知道何时点击 'Done' 按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1407273/

相关文章:

iphone - UITextField 在 UITableView 中滚动时清除 - 自定义单元格

iphone - 选择后自定义 UITableViewCell 背景变为透明

iphone - touchesEnded :withEvent: not being called from my UIView, 位于 UITableView 之上

ios - 如何在 Swift 中更改 UITableView 单元格的高度?

objective-c - 在 numberOfRowsInSection 中调用 TableView BeginUpdates

ios - 如何在 alertview 上找到索引路径?

iphone - 如何用 2 根手指在 iOS 4 中滚动 iframe?

c# - iPad 上的 iOS 应用程序删除点十进制值

iphone - 从iPhone上的远程sql表获取数据

iphone - 设置适合不同单元格的文本