FlexboxSwiftItem

data class FlexboxSwiftItem(val style: FlexItemStyle, val preferredWidth: Float, val preferredHeight: Float)(source)

Describes a flex item for use from Swift when implementing SwiftUI's Layout protocol.

The preferredWidth and preferredHeight should be obtained from SwiftUI's subview.sizeThatFits(.unspecified) inside a Layout.placeSubviews call.

Constructors

Link copied to clipboard
constructor(style: FlexItemStyle, preferredWidth: Float, preferredHeight: Float)

Properties

Link copied to clipboard

Natural height in points; obtained from subview.sizeThatFits(.unspecified).height.

Link copied to clipboard

Natural width in points; obtained from subview.sizeThatFits(.unspecified).width.

Link copied to clipboard
val style: FlexItemStyle

Flex item layout properties.