Thu, 16 Apr 2026 10:28:23 +0000
swiftui

#SwiftUI animation and withAnimation work differently!

1) animates any changes, not just changes to the value parameter
``` .animation(.linear(duration: duration).repeatForever(autoreverses: false), value: rotationAmount)
.onAppear { rotationAmount = .pi * 2 }
```
2) working as expected:
``` .onAppear {
withAnimation(.linear(duration: duration).repeatForever(autoreverses: false)) {
rotationAmount += .pi * 2
}
}
```