Instance Method インスタンスメソッド

width(min:ideal:max:)

Creates a resizable table column with the provided constraints.

Declaration 宣言

func width(min: CGFloat? = nil, ideal: CGFloat? = nil, max: CGFloat? = nil) -> TableColumn<RowValue, Sort, Content, Label>
Available when RowValue conforms to Identifiable, Sort conforms to SortComparator, Content conforms to View, and Label conforms to View.

Parameters パラメータ

min

the minimum width of a resizable column. If non-nil, 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 start 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, must be greater than 0. Pass CGFloat.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