I had 4 UITableView which represents 4 tabs from my UITabBar. So I have an unique custom TableViewController which controls every screen depending on the entity (on CoreData) it has to display. In order to fetch elements from CoreData I use a NSFetchedResultsController.
但是,由于营销原因,我不得不合并2个屏幕,这意味着在同一屏幕上显示2个实体。 因此,我不得不从2个不同实体抽取一些内容。 我还有一个抽象的实体“要素”,即我用在我的表格“主计长”中,抽象地控制每个实体。
什么是最佳解决办法?
- Do I have to rewrite my Model to merge those 2 entities (this is a problem because the 2 entities are a bit different)
- Can I tell to my NSFetchedResultsController to fetch 2 entities ? How ?
- Can I tell to my NSFetchedResultsController to fetch the Element entity and afterwards to predicate those Entities ? How ?
事先感谢你!