title: Repeating animation on SwiftUI Image
body: <p>Given the following <code>struct</code>:</p>
  
  <pre><code>struct PeopleList : View {
      @State var angle: Double = 0.0
      @State var isAnimating = true
  
      var foreverAnimation: Animation {
          Animation.linear(duration: 2.0)
              .repeatForever()
      }
  
      var body: some View {
          Button(action: {}, label: {
              Image(systemName: "arrow.2.circlepath")
                  .rotationEffect(Angle(degrees: self.isAnimating ? self.angle : 0.0))
                  .onAppear {
                      withAnimation(self.foreverAnimation) {
                          self.angle += 10.0
                      }
                  }
          })
      }
  }
  </code></pre>
  
  <p>I was hoping that the <code>Image</code> would rotate clockwise and repeat until <code>self.isAnimating</code> is <code>false</code> although it's only animated once.</p>