Contents

UIStackView.Distribution.fill

A layout where the stack view resizes its arranged views so that they fill the available space along the stack view’s axis.

Declaration

case fill

Discussion

When the arranged views don’t fit within the stack view, it shrinks the views according to their compression resistance priority. If the arranged views don’t fill the stack view, it stretches the views according to their hugging priority. If there’s any ambiguity, the stack view resizes the arranged views based on their index in the arrangedSubviews array.

The following image shows an example of a horizontal stack view that uses the UIStackView.Distribution.fill distribution.

[Image]

See Also

Constants