deleteRow

Posted 羊羊羊

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了deleteRow相关的知识,希望对你有一定的参考价值。

如果是删除某一行的话,直接delete就可以,行数要在删除之前剪掉,否则会崩溃。

 

但是,如果section要减一的话,是不能删掉section的

Terminating app due to uncaught exception ‘NSInternalInconsistencyException‘,
reason: ‘Invalid update: invalid number of sections.
The number of sections contained in the table view after the update (1) must be equal to the number of sections contained in
the table view before the update (2), plus or minus the number of sections inserted or deleted (0 inserted, 0 deleted).‘

  意思就是section的个数不能有增有减。

以上是关于deleteRow的主要内容,如果未能解决你的问题,请参考以下文章

tableView.deleteRows(at:with:) 每次都崩溃

在 deleteRows 之后 TableView reloadData

Mysql Java Derby Netbeans:不允许“deleteRow”,因为 ResultSet 不是可更新的 ResultSet

deleteRow

JavaScript - 在最后一行的 deleteRow 之后,无法正确向上移动表格

jquery easyui里的datagrid删除行方法(deleteRow)怎么用