如何检测删除按钮UItableviewcell是否被隐藏? [英] How to detect if delete button UItableviewcell was hidden?

查看:115
本文介绍了如何检测删除按钮UItableviewcell是否被隐藏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个视图,包含一个UITableView。
当用户滑动时,我可以在单元格上显示删除按钮。

I have a view that contains a UITableView. I'm able to show the delete button on the cell when the user swipes.

如果用户触摸删除按钮,将触发一个方法工作正常)。
但是如果用户决定不删除单元格,他触摸视图中的任何位置来隐藏删除按钮。

If the user touches the delete button a method will be triggered (this works fine). But if the user decides to not to delete the cell and he touches anywhere in the view to hide the delete button.

如何检测到?

推荐答案

在单元格中的删除标记之外,您的程序应该接收对表视图代理上的 tableView:didEndEditingRowAtIndexPath:的调用。

When the user taps outside the delete mark in a cell, your program should receive a call to tableView:didEndEditingRowAtIndexPath: on the table view delegate.

这篇关于如何检测删除按钮UItableviewcell是否被隐藏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆