UIStackView.Distribution.equalCentering
A layout that attempts to position the arranged views with equal center-to-center spacing along the stack view’s axis, while maintaining the spacing property’s distance between views.
Declaration
case equalCenteringDiscussion
If the arranged views don’t fit within the stack view, it shrinks the spacing until it reaches the minimum spacing defined by its spacing property. If the views still don’t fit, the stack view shrinks the arranged 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]