splitArrangementFixedLayoutSize(horizontal:vertical:)
Sets the preferred size constraint for an arrangement view in a split style to the ideal size of the view within its container. The arrangement view will prefer this size, but may resize to a smaller size depending on the priority of the view.
Declaration
nonisolated func splitArrangementFixedLayoutSize(horizontal: Bool = true, vertical: Bool = true) -> some View
Parameters
- horizontal:
Whether to prefer a fixed width for the view in a horizontal split.
- vertical:
Whether to prefer a fixed height for the view in a vertical split.
Discussion
ArrangementView {
ChartView()
.splitArrangementFixedLayoutSize(horizontal: true, vertical: false)
} secondary: {
NewsView()
}
.arrangementViewStyle(.split)See Also
Dynamically arranging a primary and secondary view
ArrangementViewarrangementViewStyle(_:)ArrangementViewStyleoverlayArrangementEdge(_:)splitArrangementLayoutRatio(_:)splitArrangementLayoutRatio(minHorizontal:idealHorizontal:maxHorizontal:minVertical:idealVertical:maxVertical:)splitArrangementLayoutSize(minWidth:idealWidth:maxWidth:minHeight:idealHeight:maxHeight:)