Sorting the primary data object by relationship

I am developing an application where I need to display UITableView, like this one:

Tableview nodes

I use Core Datawith one object named Node , this object has 3 attributesand 2 relationships. One relationshipis equal parent, this ratio indicates Nodeitself from one to one. Another attitude childs(sorry, I know these are children, but I like words ending in s for one to many relationships). childsindicates a Nodeone-to-many relationship and an inverse relationship to the parent.

enter image description here

The problem is that I don’t know how to sort the elements in fetchedResultsControlerto display them in TableView, like this image.

thank

+4

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


All Articles