SwiftUI selectable lists where selection variable is ordered
I'll keep it simple, I have a List with UUID identified items. This list is selectable, when EditMode() is entered user can tap items, and these get added to the selection variable: And the selection variable is: @State var selection = Set<UUID?>() However, the issue is that I care about the order in which the items are selected. And in the selection array, the items are not updated in a FIFO or LIFO way, they seem to be random or perhaps it depends on the value of the UUID but the point is it doesn't conserve the order in which they are added. I considered using a stack to keep track of what
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.