Animated view floats into place weirdly SwiftUI
问题 So I have a circular progress bar that is declared like this struct ProgressBar: View { var progress: CGFloat var body: some View { let gradient = LinearGradient(...) ZStack { Circle() .stroke(lineWidth: 25) .opacity(0.3) .foregroundColor(Color.secondary) Circle() .trim(from: 0.0, to: CGFloat(min(self.progress, 1.0))) .stroke(gradient ,style: StrokeStyle(lineWidth: 25.0, lineCap: .round, lineJoin: .round)) .rotationEffect(Angle(degrees: 270.0)) .animation(.linear) } } } The variable progress