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的个数不能有增有减。

posted @ 2016-06-04 16:18  羊羊羊🐑  Views(395)  Comments(0Edit  收藏  举报