This might be a known limitation already, but I have an issue that when I try to transition in a child view into an animated parent view, the child view does not respect it's parent animation.
Both animations are controlled by 1 State variable. When this one changes, it should trigger both the position of the parent (via een offset modifier), as well as transition in a child view. However, the child view transitions in on the end position (so in my example, it only fades in), instead of also moving with the parent during the animation.
Both animations are controlled by 1 State variable. When this one changes, it should trigger both the position of the parent (via een offset modifier), as well as transition in a child view. However, the child view transitions in on the end position (so in my example, it only fades in), instead of also moving with the parent during the animation.
Code Block struct ContentView: View { @State private var isShowing = false var body: some View { HStack { Text("Hello") .padding() .background(Color.blue) if isShowing { Text("World") .padding() .background(Color.red) .transition(.opacity) } } .background(Color.orange) .offset(y: isShowing ? 100 : 0) .onTapGesture { withAnimation { isShowing.toggle() } } } }