I have a table view, and I want to add a row, and save it to coredata.
So is this a good practice:
when user clicks the “plus button” on navigation bar, on the screen will appear new view controller, where user can write required data for new row. When the user clicks “done” button, controller by delegation will trigger an addRow method (from RootViewController) which save data to database.
I have a table view, and I want to add a row, and save
Share
Yes, it does seem fine. The delegation is also responsible for the table view reloading once you added new entry, if your data source is stored in NSArray or other collection.
If you use NSFetchedResultsController, it will reload automatically once detects the changes made to Core Data entity.