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!), a开发者_如何学运维nd would this be safe to do in another thread?
Thanks
Andy
See this answer to this question. You just need to add your predicate to the fetch request in the provided code.
精彩评论