nixzhu / dev-blog

翻译、开发心得或学习笔记
https://apps.apple.com/cn/app/ducky-model-editor/id1525505933
3.94k stars 710 forks source link

UITableView定义滑动按钮的一个小问题 #27

Open sunyunfei opened 7 years ago

sunyunfei commented 7 years ago
译者注:上面这一段的原文是“This is the same as before, except this time we need to grab the cell from the table view using cellForRowAtIndexPath:.”,按照我的理解,滑动应该调用 tableView:commitEditingStyle:forRowAtIndexPath: ,这样才能执行我们新添加的语句。

个人感觉这一段有一点不合适。滑动不会执行tableView:commitEditingStyle:forRowAtIndexPath:这个方法,只有点击实际进行删除或者编辑操作的时候才会调用吧。

nixzhu commented 7 years ago

我的英文不算好,因此理解可能有偏差,不过这翻译也很久了,如果有更好的翻译,请直接发PR吧!😊