1

I have a horizontal uistackview with these elements:

stack view (horizontal)
element1 | element 2

Then I change the axis programmatically.

buttonsStackView.axis = UILayoutConstraintAxisVertical;

Now the view is like this

element1
element2

I want to make it like this:

element2
element1

Fattaneh Talebi
  • 727
  • 1
  • 16
  • 42
  • 2
    Possible duplicate of [Flipping the positions of items in a UIStackView](https://stackoverflow.com/questions/48376482/flipping-the-positions-of-items-in-a-uistackview) – Rakesha Shastri Dec 12 '18 at 16:17

1 Answers1

0

put an axis checker, like this

if (stack view -> horizontal)
then element1 | element2
else
element2 | element1 (add elements again in the order you want)

hope this will help you