Snowman
Snowman

Reputation: 32061

Separating NSFetchedResultsController sections into arrays

I have a NSFetchedResultsController that seperates my results into two sections. What I simply want to do is separate each section into its own array. Something like this, but this sends me an unrecognized selector error:

array1=[[[theFetchedResultsController sections] objectAtIndex:0] allObjects];
array2=[[[theFetchedResultsController sections] objectAtIndex:1] allObjects];

Upvotes: 0

Views: 194

Answers (1)

danyowdee
danyowdee

Reputation: 4698

That's because instances of NSFetchedResultsSectionInfo don't respond to -allObjects. They respond to -objects.

allObjects is an instance method of NSSet.

Upvotes: 2

Related Questions