Contents

UIStackView.Distribution.equalSpacing

A layout where the stack view maintains equal spacing between adjacent views while preserving their intrinsic content size.

Declaration

case equalSpacing

Discussion

When the arranged views don’t fill the stack view, it pads the spacing between the views evenly. If the arranged views don’t fit within the stack view, it shrinks the views according to their compression resistance priority. If there’s any ambiguity, the stack view shrinks the 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.equalSpacing distribution.

[Image]

See Also

Constants