I have a collection view on a view controller. When I dequeue a cell, it is configured with several views, one of which is the view of another view controller.
This sub-view-controller is reinitialised every time the cell is configured. Should I, or should I not, add this sub-view-controller as a child of the parent view controller that owns the collection view?
In general I would advise against using this kind of pattern. It's doable, but if you put a view controller's view in a cell, that view controller needs to be a child of the view controller owning the collection view and you have to make sure to correctly add/remove this view controller based on the cell lifecycle.