IPhone: Monthly Grouping - Master Data

I store the dates in the main attribute data object, I then show the date in the table cells. I want to group all cells by month and only display the corresponding dates in the correct sections.

I am using sectionNameKeyPath from NSFetchedResultsController, but I only need to use the month in the date group. How can i achieve this? Will I need to create a new attribute and store only a month as a string, or can I use NSPredicate?

Please let me know if they did this or gave me examples.

thank

+3
source share
2 answers

, , , , . , , , . NSDateComponents . . , NSFetchedResultsController, , sectionNameKeyPath. , , getMonth, , , sectionNameKeyPath. , . , .

. , , ( ) Table View .

+5

Source: https://habr.com/ru/post/1739547/


All Articles