Getting NSFetchedResultsController, NSSortDescription and sectionNameForKeyPath to work together

后端 未结 4 1761
陌清茗
陌清茗 2021-01-18 02:23

I\'m currently working on an App that has a couple of Entities and relationships as illustrated below:

Item <<--> Category.

4条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-18 02:47

    That's a perfectly good solution to the problem, Rog.

    You certainly don't want/need to subclass NSFetchedResultsController.

    @aroth, we don't have enough information to know the details of his object model, but the names certainly imply that category does not own item. Item has a category. His intent is to display a list of items, that is why he is fetching items.

提交回复
热议问题