ios – WrappingHStack does not animate (transition) into view

I’ve a view with a WrappingHStack in it. The view has withAnimation when it’s displayed, with .transition(.transfer(edge: .backside)) because the transition on it.


Within the following code, all the pieces within the view (e.g. the Textual content("Lorem ipsum")) accurately transitions with the slide. Apart from the WrappingHStack. I added .transition(.slide), nonetheless nothing. It simply seems immediately in place whereas all the pieces round it slides in. Why is that this, and the way do I get it to slip alongside the opposite content material?

VStack {
    Textual content("Lorem ipsum")
        .font(.system(measurement: 18, weight: .medium, design: .rounded))
    WrappingHStack(0..<self.phrases.rely, id:.self, alignment: .middle) { i in
        Button(motion: {
        }) {
            Textual content(phrases[i])
                .font(.system(measurement: 18, weight: .daring, design: .rounded))
        .padding(.backside, 10)

Leave a Reply