I have a table view where each row contains a collectionView. Each collectionView is only one row tall and scrolls horizontally. So, if you can imagine, I have several horizontally scrolling carousels stacked on top of each other.
I've seen several tutorials for this type of layout and they all have a single UIViewController which is the dataSource and delegate for both the UITableView and all UICollectionViews. This allows that viewController to reuse tableView cells and the collectionViews inside them.
Because of some other code reuse considerations, I would like to structure my code differently. I would like to have a UITableViewController which manages the table and then have UICollectionViewControllers which manage each collection view. This does work but because UICollectionViewController contains its own UICollectionView, I can not reuse collectionViews as the user scrolls through the the table exposing different carousels.
So finally my question, can you inject or replace the collectionView used by a UICollectionViewController so that I can reuse views across multiple View Controllers.