首页 > 技术文章 > UITableView左右滑动cell无法显示“删除”按钮的原因分析

tufei7 2017-11-30 12:53 原文

http://www.cocoachina.com/bbs/read.php?tid-145693.html

- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath;
这个方法一定要实现,因为系统会判断你是否实现了这个方法,只有实现了这个方法,在cell上左右滑动时才会出现“删除”按钮。

推荐阅读