Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的基本应用程序中,我目前将数据存储在一个没有问题的表中,当用户选择一行时,它将相关数据加载到一个带有静态表视图(三个单元格)的新 VC 中。现在,我希望能够在用户点击它们时(可能在编辑模式下)编辑这三个单元格的值,就像在联系人应用程序中一样。我该怎么做呢?另外,有没有办法在编辑模式下禁用删除功能?
调用setEditing:animated:表格视图的方法并实现所需的委托方法,例如
setEditing:animated:
tableView:canEditRowAtIndexPath:
tableView:commitEditingStyle:forRowAtIndexPath:
我建议阅读这一章
插入和删除行和节