lost.in.code
lost.in.code

Reputation: 27

Align items in horizontal UIStackView from the center

here is what I have now

Hi all :) There is a situation when I need to align items in the UIStackView from the center. So if there is 2, 3, 4 (no matter how many) they should be aligned from the center, not from the left/right side etc. Is it possible to implement? I have parent vertical stackView and 2 nested horizontal stackviews with UIImageViews inside.

Upvotes: 1

Views: 2853

Answers (1)

Raja Kishan
Raja Kishan

Reputation: 19014

Set parent UIStackView (vertical stackView) alignment to center.enter image description here

Upvotes: 5

Related Questions