UIArrangementViewController
A view controller that presents its container view controllers through an arrangement.
Declaration
@MainActor class UIArrangementViewControllerOverview
You create an arrangement view controller and set a primary and secondary view controller. The arrangement view controller computes a layout for its content based on the context it is presented in, including the available size, size class, and hardware features.
Use updateArrangement(_:animated:) to choose how the arrangement view lays out its content. The default style is UISplitArrangement. The other built-in style is UIOverlayArrangement.
Overlay arrangements
An overlay arrangement layers the primary view on top of the secondary view in z-order. This layout is well-suited for full-screen experiences like media players, where playback controls overlay a video surface:
When the environment changes, such as when a foldable device is folded, the overlay arrangement can transition its views from a layered layout into a side-by-side layout. Use axes(_:) to control which axes are supported.
Split arrangements
A split arrangement places the primary and secondary views side-by-side along one or more axes. Use this layout for experiences that display two distinct pieces of content simultaneously, such as a music player alongside its lyrics:
The split arrangement adapts its axis based on the available size and size class. You can constrain which axes the split supports using axes(_:).
Topics
Creating an arrangement view controller
Configuring the arrangement
UIArrangementViewController.ArrangementUIOverlayArrangementUISplitArrangementupdateArrangement(_:animated:)
Managing arrangement view controllers
UIArrangementViewController.ViewPlacementviewController(for:)setViewController(_:for:animated:)placement(for:)