Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The problem is not in the <code>NSFetchedResultsControllerDelegate</code> methods. Those methods only come into play only if something changes the data model while the table is visible. </p> <p>Your problem is that you change the data while the table view is off screen and inactive. Tableviews are designed to automatically display the data model given to them. When you return to the tableview from the detail view, it automatically reloads its data which now contains the changes made in the detail view. It would do that regardless of how you provided data to the table. </p> <p>The only way to prevent the table from displaying the changes until you want it to is to not add the data to the data model until you want the change to appear. You would have to pass the data from the detail view back to the table in a non-managedObject and create the managedObject in the tableview controller when you wanted it to appear. </p> <p>However, from a UI design perspective, I suggest you rethink your design. If you don't change the table until after it reloads, how will you signal the users that you are going to make the change? Will the UI just suddenly update for no apparent reason? Will the user have to initiate it? What if they forget? </p> <p>I think that users will expect any changes made in the detail view to be instantly reflected in the tableview because that is how virtually all tableview-detailView pairings work. For example, if you change a contact's name in the contact detail of the AddressBook that is reflected instantly when you go back to list of contacts. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload