Greg Greg - 23 days ago 15
iOS Question

how to programmatically reorder items within a UIStackView in IOS?

How can one programmatically reorder items within a UIStackView in IOS?

(i.e. I can not see a function at https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIStackView_Class_Reference/#//apple_ref/doc/uid/TP40015256-CH1-SW30 to cover this)???

Answer

surely you can use a combination of

removeArrangedSubview(_:)
insertArrangedSubview(_:atIndex:)

to reorder your views?

Comments