Core Data - GROUP BY
I am trying to group results returned by Core Data. I read that you need to use "SortDescriptors" with a selector but I cant seem to get it to work?
I am trying to return group'ed "unique" name values?
http://developer.apple.com/library开发者_StackOverflow社区/ios/#documentation/cocoa/Conceptual/SortDescriptors/Concepts/Creating.html
Actually, I think you want @distinctUnionOfObjects
. See the Xcode Documentation: Key-Value Coding Programming Guide: Collection Operators.
try using @distinctUnionOfArrays.contactNumber to get the objects
精彩评论