title: swiftui, animation applied to parent effect child animation
body: <p>RectangleView has a slide animation, his child TextView has a rotation animation. I suppose that RectangleView with his child(TextView) as a whole slide(easeInOut) into screen when Go! pressed, and TextView rotate(linear) forever. But in fact, the child TextView separates from his parent, rotating(linear) and sliding(linear), and repeats forever.</p>
  <p>why animation applied to parent effect child animation?</p>
  <pre><code>struct AnimationTestView: View {
      @State private var go = false
      var body: some View {
          VStack {
              Button(&quot;Go!&quot;) {
                  go.toggle()
              }
              if go {
                  RectangleView()
                      .transition(.slide)
                      .animation(.easeInOut)
              }
          }.navigationTitle(&quot;Animation Test&quot;)
      }
  }
  
  struct RectangleView: View {
      var body: some View {
          Rectangle()
              .frame(width: 100, height: 100)
              .foregroundColor(.pink)
              .overlay(TextView())
      }
  }
  
  struct TextView: View {
      @State private var animationRotating: Bool = false
      let animation = Animation.linear(duration: 3.0).repeatForever(autoreverses: false)
      
      var body: some View {
          Text(&quot;Test&quot;)
              .foregroundColor(.blue)
              .rotationEffect(.degrees(animationRotating ? 360 : 0))
              .animation(animation)
              .onAppear { animationRotating = true }
              .onDisappear { animationRotating = false }
      }
  }
  </code></pre>