試圖從UITableView
刪除一行,一切工作正常,當我刪除了最後一排左(at index 0,0)
在這種情況下,我得到一個錯誤說deleteRowAtIndexPath實際上並沒有刪除該行
The number of sections contained in the table view after the update
(0) must be equal to the number of sections contained in the table
view before the update (1), plus or minus the number of sections
inserted or deleted (0 inserted, 0 deleted).'
這之後發生除它達到了
[tableView endUpdates];
這就是刪除行函數之後。
任何想法爲什麼deleteRowsAtIndexPaths
函數不起作用?我檢查了indexPath
,它顯示0,0就像它應該。
感謝
我覺得在刪除特定部分的最後一行時,您必須減少部分數量。 –