我有一個表,我操縱一個tableViewController(沒有筆尖,並且控制器正在幕後創建表) 我試圖從表中刪除一行基於它的行號;我可以從數組中刪除它,我用它來創建cellForRowAtIndexPath中的單元格,但是如果我嘗試執行以下操作(與tableView中的代碼相同),我得到一個奇怪的錯誤:commitEditingStyle:forRowAtIndexPath: 它工作正常如何以編程方式刪除表格行?
NSIndexPath * indexPath = [NSIndexPath indexPathForRow:i + 1的切入口:1]
[self.tableView deleteRowsAtIndexPaths:[NSArray的 arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
它給出了一個錯誤
- [_ WebSafeForwarder forwardInvocation:]
,然後跳出方法,但不會崩潰的應用程序
誰能幫助?
它實際上在代碼中的分號 - 剪切和粘貼錯誤! – 2010-04-21 16:03:56