UICollectionViewCompositionalLayout can support manual calculate height (or width)?

Viewed 111

My UICollectionView used the method in YYKit before, first, calculate the frame of the data and store it in the ViewModel. Update the height of the cell as a Layout delegate. This eliminates the need to calculate the height of the cell while sliding.

Now I view becomes complicated, need embedded cells of different sliding directions, so I'd like to convert UICollectionViewCompositionalLayout for layout. But UICollectionViewCompositionalLayout didn't seem to support the manual calculation height (or width) but through the way of the estimate to the layout. This is not suitable for my handwritten layout of cells. Is there any way I can dynamically change NSCollectionLayoutSize when I define NSCollectionLayoutItem?

0 Answers
Related