splitArrangementLayoutSize

Sets the size constraints for an arrangement view in a split style.

View ModifieriOS 27.1+macOS 27.1+tvOS 27.1+watchOS 27.1+visionOS 27.1+splitArrangementLayoutSize(minWidth:idealWidth:maxWidth:minHeight:idealHeight:maxHeight:) in SwiftUI

Declaration

React
compose().splitArrangementLayoutSize({
  minWidth?: number | null,
  idealWidth?: number | null,
  maxWidth?: number | null,
  minHeight?: number | null,
  idealHeight?: number | null,
  maxHeight?: number | null,
})
Swift
nonisolated func splitArrangementLayoutSize(
    minWidth: CGFloat? = nil,
    idealWidth: CGFloat? = nil,
    maxWidth: CGFloat? = nil,
    minHeight: CGFloat? = nil,
    idealHeight: CGFloat? = nil,
    maxHeight: CGFloat? = nil
) -> some View

Parameters

  • options.minWidthnumber | null

    The minimum width for horizontal splits.

  • options.idealWidthnumber | null

    The ideal width for horizontal splits.

  • options.maxWidthnumber | null

    The maximum width for horizontal splits.

  • options.minHeightnumber | null

    The minimum height for vertical splits.

  • options.idealHeightnumber | null

    The ideal height for vertical splits.

  • options.maxHeightnumber | null

    The maximum height for vertical splits.

Discussion

Views with higher layoutPriority are sized first using their ideal size, clamped to their min and max values. Width constraints apply to horizontal arrangements, and height constraints apply to vertical arrangements.

ArrangementView {
    PhotoView()
        .splitArrangementLayoutSize(
            minWidth: 200,
            idealWidth: 320,
            maxWidth: 400)
} secondary: {
    InfoView()
}
.arrangementViewStyle(.split)

See also

More in Navigation.