UICollectionViewCompositionalLayout invalidation context and coordinate space transforms during interactive hinge transitions

Hello UIKit team,

When building custom multi-column layouts with UICollectionViewCompositionalLayout that must dynamically span or split across the iPhone Duo's .division reserved region during continuous hinge motion:

What is the recommended strategy for handling UICollectionViewLayoutInvalidationContext during live fold/unfold gestures? Specifically, does the system coalesce intermediate trait changes (registerForTraitChanges) to allow smooth orthogonal scrolling without constantly purging cached layout attributes or triggering full cell rebinds?

When adapting custom container view controllers using viewWillTransition(to:with:), should we coordinate layout updates through the UIViewControllerTransitionCoordinator's animate(alongsideTransition:), or does UIKit provide a dedicated layout guide / accessory pipeline that guarantees zero hitch when the trailing/leading safe area insets flip dynamically around the physical crease?

Thanks!

Could you provide an example of the UI that's currently built using compositional layouts? In general, we don't recommend having grids avoid the division regions, as long as their content is scrollable.

Note that there are no traits or safe area insets applied by default by the division region. NavigationSplitView/UISplitViewController` have built-in behavior to appropriately pad their columns when the device is in the "Book" pose, which they achieve, by adjusting column widths and layout margins within the column.

For a compositional layout, if you need to avoid the area of the fold, you should only do that in sections that aren't scrolling orthogonal to the fold's axis, by reading the reserved regions from the collection view and manually adjusting your compositional layout.

There is no automatic fold avoidance to UICollectionView or compositional layout at this time, continuous or otherwise.

UICollectionViewCompositionalLayout invalidation context and coordinate space transforms during interactive hinge transitions
 
 
Q