views:

289

answers:

1

Hello,

I'm using an NSFetchedResultsController in an iPhone app, and am wondering if there is some easy way of getting the total number of rows returned in all sections.

Instead of getting the [[fetchedResultsController sections] count] and then looping through each section to get its count, can it be done in one line?

Thanks!

+3  A: 

This line returns the total number of fetched objects:

[fetchedResultsController.fetchedObjects count]
gerry3
Thanks! I knew it had to be something simple like that!
Neal L