Swift Animationのlinearとspeedというかdefault、画像をレコードの様に回したい

やりたい事

Imageを永続的に回す。

linearとdefault.speed

Animation.default.repeatForever(autoreverses: false).speed(0.2)

結果:1周毎に一度止まる(永続的に回ってはいるが)

Animation.linear(duration: 1.5).repeatForever(autoreverses: false)

結果:永続的に回る

コード

import SwiftUI

struct Annimation: View {
    @State private var rotation: Double = 0
    @State private var rotationDefault: Double = 0

    var body: some View {
        VStack {
            Image(systemName: "paperplane.circle.fill")
                .font(.largeTitle)
                .rotationEffect(.degrees(self.rotation))
            Image(systemName: "paperplane.circle.fill")
                .font(.largeTitle)
                .rotationEffect(.degrees(self.rotationDefault))
        }
        .onAppear {
            withAnimation(Animation.linear(duration: 1.5).repeatForever(autoreverses: false)) {
                self.rotation = 360
            }
            withAnimation(Animation.default.repeatForever(autoreverses: false).speed(0.2)) {
                self.rotationDefault = 360
            }
        }
    }
}

Swift

Posted by shi-n