I have a UITableView
tied to core data. When there are no entries, I hack the table to make sure that #sections = 1, #rows = 1, and that this row displays text that says "your table is empty; add a new item using the + button".
When the user adds his first item by clicking the + button, though, core data throws an exception saying that the number of rows after the update (1) is not equal to the number of rows before the update (1) plus or minus (1 inserted, 0 deleted). This makes sense, because Core Data presumably queries the same functions that my tableview does (numberOfSectionsInTableView
and numberOfRowsInSection:section
). But how do I tell core data that I was lying to the tableview, and that the number of rows before the update was actually 0?