small medium large xlarge

Back to: All Forums  Core Data
Generic-user-small
06 Oct 2009, 14:54
Chris Nickel (1 post)

Im hoping someone can help me with an issue im having with updating a tableview via the insertRowsAtIndexPaths: method.

I am calling a resource on the internet and creating entities based on the data i receive, for each entity I create and populate, I immediately save the entity to the managed object context. I can see each of the NSFetchedResultControllers delegate methods get invoked, and in the didChangeObject, I insert the new row to the tableview.

I do not see the rows being inserted into the table view until the method that retrieves and saves finishes, even though all the tableview datasource methods are being called during the process.

Thanks,

Avatarsmall_pragsmall
27 Oct 2009, 00:10
Marcus S. Zarra (284 posts)

Correct because the insertRowsAtIndexPaths method is in the middle of an update transaction. It won’t update until the entire update is complete. This is by design. Take a look at the @-controllerWillChangeContent:@ and @-controllerDidChangeContent:@ methods of the delegate.

You must be logged in to comment