splitArrangementFixedLayoutSize

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.

View ModifieriOS 27.1+macOS 27.1+tvOS 27.1+watchOS 27.1+visionOS 27.1+splitArrangementFixedLayoutSize(horizontal:vertical:) in SwiftUI

Declaration

React
compose().splitArrangementFixedLayoutSize({
  horizontal?: boolean,
  vertical?: boolean,
})
Swift
nonisolated func splitArrangementFixedLayoutSize(
    horizontal: Bool = true,
    vertical: Bool = true
) -> some View

Parameters

  • options.horizontalboolean

    Whether to prefer a fixed width for the view in a horizontal split.

  • options.verticalboolean

    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

More in Navigation.