iPhone: Group by month - Core Data
Posted
by Shaun
on Stack Overflow
See other posts from Stack Overflow
or by Shaun
Published on 2010-04-01T23:18:48Z
Indexed on
2010/04/01
23:23 UTC
Read the original article
Hit count: 477
iphone
|iphone-sdk
Hi
I store dates in a core data entity attribute, I then display the date in the table cells. I want to group all the cells according to months and only display the relevant dates in the correct sections.
I'm using sectionNameKeyPath of the NSFetchedResultsController, but I need to only use the month in the date to group. How can I achieve this? Would I need to create a new attribute and store just the month as a string or can I use NSPredicate?
Please can anyone let me know if they have done this or give me some examples.
Thanks
© Stack Overflow or respective owner