简体   繁体   English

iOS7 UITableView滑动以删除并触摸以隐藏删除按钮

[英]iOS7 UITableView swipe to delete and touch to hide delete button

I've a UITableView with the possibility to swipe on a cell to delete it. 我有一个UITableView ,可以在单元格上滑动以将其删除。

I need two information 我需要两个信息

  1. When a cell show the Delete button after a swipe 滑动后单元格显示“删除”按钮时
  2. When the user tap on the screen to "close" the cell to hide the Delete button. 当用户点击屏幕上的“关闭”单元格以隐藏“删除”按钮时。

I need this to hide some buttons during the delete. 我需要它来在删除过程中隐藏一些按钮。

1) You can use this UIableViewDelegate method: 1)您可以使用以下UIableViewDelegate方法:

tableView: willBeginEditingRowAtIndexPath:

2) You can use this UIableViewDelegate method: 2)您可以使用以下UIableViewDelegate方法:

tableView: didEndEditingRowAtIndexPath:

Hope this help. 希望能有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM