Core Data (NSFetchedResultsController) displaying one row per section
Posted
by Urizen
on Stack Overflow
See other posts from Stack Overflow
or by Urizen
Published on 2010-04-08T01:00:26Z
Indexed on
2010/04/08
1:03 UTC
Read the original article
Hit count: 381
I have a CoreData application which uses NSFetchedResultsController
. NSFetchedResultsController
is useful in that it allows me to access the fetched objects more easily etc. but I find that I have problems with the following:
I get a crash when I display a single row for each section (irrespective of the number of actual rows present) as a summary of the information in that section (e.g. showing a statistical analysis of the data contained in the fetched rows for that section).
I understand that the NSFetchedResultsControllerDelegate
methods have to agree with the number of rows reported per section by the UITableView Delegate method but I would like to be able to fetch all of the records for each section without necessarily displaying each of the rows.
The above causes me inconsistency crashes, when I try to insert or delete data for a section, which reports that the number of rows for each section is not as it should be given the number of insertions/deletions.
Is there any way I can do what I'm trying to achieve?
Thanks for any help.
© Stack Overflow or respective owner