有什么办法,我们可以知道 UITableViewCell 上的删除按钮在 iOS 6 中被点击。在 iOS 7 中,showingDeleteConfirmation 属性设置为 NO,但在 iOS 6 中它保持为 YES。
我想区分何时点击红色 - 按钮和何时点击删除按钮。这在 iOS 7 中运行良好,但在 iOS 6 中运行不正常。
最佳答案
在您的 View Controller 上添加委托(delegate)回调:
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
if (editingStyle == UITableViewCellEditingStyleDelete) {
//Tap delete here
}
}
关于ios - 如何知道是否在 iOS 6 UITableViewCell 上点击了删除按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23164023/