UICollectionView compositional layout with variable length items

Is it possible to have horizontal scrolling 2D UICollectionView with cells which are variable in width but same in height without subclassing UICollectionViewLayout? Some items may be even more than the size of collectionView frame and the size of any two items is not the same in general and the gap between successive items may also be variable. WWDC videos say compositional layout can achieve anything we can imagine, not sure how to do this.

Replies

You may want to explore + estimatedDimension:. If you'd like in depth support while implementing your layout please file a Technical Support Incident and someone should be able to provide more guidance.
@ricob Thanks for the response. To tell my requirements, I was evaluating whether it is possible to use UICollectionView to implement a video editing timeline like in Final Cut Pro (https://help.apple.com/assets/5D6EB1CB094622CB34375CC7/5D6EB1D4094622CB34375CDC/en_US/ada7bd21a661acc9b512ccec5b9730d0.png ). I am getting convinced to use UIScrollView rather than UICollectionView. If you think I need to file a TSI, I would do so. Otherwise if you can guide me on the right path, that would be nice too.