ios - 无法点击 UITableView 中的红色减去删除按钮

标签 ios uitableview cocoa-touch

我可以通过以下调用使红色减号按钮出现在我的每个 UITableViewCells 上:

[self.tableview setEditing:YES];

-(UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath {

    return UITableViewCellEditingStyleDelete;
}

现在,红色减号按钮出现在 UITableViewCells 的左侧。但是,我无法通过简单的点击与他们互动(只有当我从红色减号向右滑动时)。

我希望“删除”按钮在我点击“红色减号”按钮时出现,而不仅仅是在我滑动时出现。

为什么我的“红色减号”按钮听不到点击手势?

编辑:这是我的 UITableViewCells 的截图:

Edit mode on my UITableViewCells

最佳答案

想通了。我有一个手势识别器妨碍了(当您在搜索栏外单击时关闭键盘)。

一旦我删除,一切都很好!

关于ios - 无法点击 UITableView 中的红色减去删除按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17113997/

相关文章:

ios - 从 NSMutableArray 添加按钮到 UIActionSheet

iphone - 循环遍历 UITableView 的 UITableViewCells

ios - UILabel动态字体大小不断突破

ios - TwitterKit : Can't bypass Fabric consumer key and app id

删除一行 UITableView 时 iPhone 应用程序崩溃

ios - 滚动后重复相同的单元格

iphone - 具有非 GPL 许可的 iOS 的 SIP 库

iphone - 如何从uitableviewcell中的uibutton加载弹出窗口

ios - 核心剧情: Show yearly labels on the x-axis for daily values

ios - 用简单的英语解释 NSIncrementalStore