Is it possible to set a sort order for a UIStackView
? For example, I want to sort it by time. Each subview has a time
property which is just an Int
.
I know you can sort a UITableView
by sorting the array and then refreshing the table but UIStackView
doesn't have delegates and data sources like that so I don't know how to go about this. It just seems to go by the order you add the subviews in which makes it challenging to add a view in the middle without removing everything first.