iOSDevil
iOSDevil

Reputation: 1816

iphone, get the object count without performing a fetch?

I seem to recall that it's possible to return the resulting object count from an NSPredicate in CoreData without actually performing a fetch, but I can't find any reference to this.

Can someone confirm that I wasn't dreaming (sad dream to have!), and would this be safe to do in another thread?

Thanks

Andy

Upvotes: 2

Views: 2142

Answers (1)

Brad Larson
Brad Larson

Reputation: 170319

See this answer to this question. You just need to add your predicate to the fetch request in the provided code.

Upvotes: 3

Related Questions