Custom sorting using categories and core data - is it supported by the framework?

前端 未结 1 979
滥情空心
滥情空心 2020-12-19 14:27

I\'m developing for iPhone iOS 4.0 and I have a list of birthday objects (date + name) stored using Core Data. I want to use the NSFetchedResultsController to retrieve this

相关标签:
1条回答
  • 2020-12-19 15:31

    Sorting inside of the NSFetchedResultsController is performed at the persistent store level so if you are using SQLite as the backend it will fail.

    For something like this I would de-normalize the data and store the month and day of month in addition to the actual birthdate so that you can sort on them.

    0 讨论(0)
提交回复
热议问题