A very basic question about model-view-controller (MVC).
I have a custom UICollectionView filled with custom UICollectionViewCells
. The collection view defines the size of the cells within the UICollectionViewDelegateFlowLayout
method, collectionView: sizeForItemAtIndexPath
. Meanwhile, subviews are added and removed via the custom collection cell view controller.
My question: when adding or removing subviews from the cell's view controller, how do I also tell the collection view controller to change the height?
I do understand delegate and data source concepts, but figure that the cell is it's own delegate, so how does the message ('change the height to...') get passed from the cell to the collection view controller when subviews are added/removed?