我被困在一個問題中,我有一個可以讓行說5的行。 如果用戶選擇一行,那麼應該創建一個恰好在被點擊行下方的新行/插入一個動畫(正如我們在部分隱藏/取消隱藏中看到的那樣),並且在點擊新插入的行時它應該被刪除。在uitableview的同一部分插入/創建新行
我已經給了一個嘗試,但它說
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid
update: invalid number of rows in section 0. The number of rows contained in an existing section
after the update (6) must be equal to the number of rows contained in that section before the update
(5), plus or minus the number of rows inserted or deleted from that section (0 inserted, 0 deleted).'
所以應該是什麼其他的方式來實現這一功能? 在此先感謝。
這是最有可能的答案。總之,在調用'insert'或'delete'之後,從'numberOfRows'返回正確的數字。 – mxcl
嘿傢伙...感謝您的意見...我已經整理出了問題...請在下面找到我的答案 – yunas