overlayArrangementEdge(_:)
The horizontal edge a view in an overlay arrangement occupies when the arrangement transitions to a horizontal layout.
Declaration
nonisolated func overlayArrangementEdge(_ edge: HorizontalEdge?) -> some View
Parameters
- edge:
The horizontal edge to position the view at.
Discussion
Use this modifier to anchor the given view when its overlay layout transitions into a horizontal layout. For example, to move the view to the trailing side of the arrangement view, use the trailing edge.
var body: some View {
ArrangementView {
ControlsView()
.overlayArrangementEdge(.trailing)
} secondary: {
ContentView()
}
}See Also
Dynamically arranging a primary and secondary view
ArrangementViewarrangementViewStyle(_:)ArrangementViewStylesplitArrangementFixedLayoutSize(horizontal:vertical:)splitArrangementLayoutRatio(_:)splitArrangementLayoutRatio(minHorizontal:idealHorizontal:maxHorizontal:minVertical:idealVertical:maxVertical:)splitArrangementLayoutSize(minWidth:idealWidth:maxWidth:minHeight:idealHeight:maxHeight:)