I read this post but I don’t really understand the code…
I have a core data database with an Entity and some attributes. One of them is named “myDate” and has for type NSDate.
Now I want to to display each date but eliminate dates with same day-month-year and display them ascendantly .
Have you got an idea?
Thanks a lot !
If you are looking to have a UITableView with different sections for each date that has events sorted in acceding order then you can: (assuming your myDate attribute has the time as well)
myDatemaking sure to comply with KVCmyDate(you will need to useNSCalendarandNSDateComponents)[self setDateForSection:strippedDate];to set the secondary dateNSFetchedResultsControllerto usedateForSectionas thesectionNameKeyPathUITableViewby myDate (there should be a method for this but I don’t have any reference material in front of me right now, it might be in theNSFetchedResultsControlleras well).