How should `ArrangementView` behave across iPhone Duo display modes?

How should an ArrangementView be designed to adapt across the different iPhone Duo display modes, such as closed, opened, and book mode?

In some configurations, a horizontally or vertically split ArrangementView appears to display only one of its two child views. The sessions compare ArrangementView to HStack and VStack, but those containers always display all of their child views.

Is this behavior expected? If so, how should developers structure an ArrangementView so that its content adapts correctly across the different iPhone Duo display modes?

Is this behavior expected? If so, how should developers structure an ArrangementView so that its content adapts correctly across the different iPhone Duo display modes?

Yes, this behavior is expected. unlike Stacks, ArrangementView is an adaptive container that collapses to displaying only one view, prioritizing the view with higher .layoutPriority, or the primary view by default whenever its split axes cannot be satisfied within the current aspect ratio, pose, or compact size class.

You can designate the essential view using .layoutPriority, and observe @Environment(.splitArrangementAxis) when the split collapses.

Thank you, that helps. I’m still not clear on how to handle cases where ArrangementView decides to hide the secondary view.

For example, imagine a video editing app using ArrangementView { VideoPreview, EditingControls }. If the arrangement collapses and hides EditingControls, the app is no longer fully usable.

In this situation, what is the recommended way to make the secondary view accessible when ArrangementView collapses?

You can check if the size class is .compact so it is one screen or .regular where it is both using

You can use that to determine controls while in compact mode

@Environment(.horizontalSizeClass) private var hSizeClass

sorry again that didn't keep After I posted again

How should `ArrangementView` behave across iPhone Duo display modes?
 
 
Q