Contents

width(min:ideal:max:)

Creates a resizable table column with the provided constraints.

Declaration

nonisolated func width(min: CGFloat? = nil, ideal: CGFloat? = nil, max: CGFloat? = nil) -> TableColumn<RowValue, Sort, Content, Label>

Parameters

  • min:

    The minimum width of a resizable column. If non-nil, the value must be greater than or equal to 0.

  • ideal:

    The ideal width of the column, used to determine the initial width of the table column. The column always starts at least as large as the set ideal size, but may be larger if table was sized larger than the ideal of all of its columns.

  • max:

    The maximum width of a resizable column. If non-nil, the value must be greater than 0. Pass doc://com.apple.documentation/documentation/CoreFoundation/CGFloat/1454161-infinity to indicate unconstrained maximum width.

Discussion

Always specify at least one width constraint when calling this method. Pass nil or leave out a constraint to indicate no change to the sizing of a column.

To create a fixed size column use width(_:) instead.

See Also

Setting the column width