saving a deleted item

Hi all,

I recently built a basic to-do list app, but the issue I have at the moment is that, after I delete an item I have entered on the list and close the app out and open it back again, the item I deleted pops back up. I want to know how I can save and update a delete.

Where and how do you save items ?

  • What do you do when you delete ?
  • Do you update the data source (the array used to populate the List) by removing the deleted item from the array ?
  • Do you save the reduced list ?

Please show code, your explanation does not provide enough information.

Perhaps if you are using core data, you are forgetting to call the save() function on the managedObjectContext variable?

try? moc.save()
saving a deleted item
 
 
Q