How to change direction of views by one command in UIStackView? For example, I have: View1, View2, View3 horizontally distributed and I want them to be View3, View2, View1 also horizontally distributed
Asked
Active
Viewed 868 times
1 Answers
1
I am not sure it is possible in one command, but simply remove all subviews and re-add all subviews in reverse order (but last one if you want to optimize)
removeArrangedSubview(_:)
insertArrangedSubview(_:atIndex:)
As stated how to programmatically reorder items within a UIStackView in IOS?