This code doesn't seem to work correctly. It should spin a system image using a very simple view modifier. Am I doing anything wrong in the code ?
This app used to be Amazing ... what happened on the last update ?
Code Block swift import PlaygroundSupport import SwiftUI struct ContentView: View { var body: some View { Image(systemName: "timer") .spinning() } } struct Spinning: ViewModifier { @State var isVisible: Bool = false func body(content: Content) -> some View { content .rotationEffect( Angle(degrees: isVisible ? 360 : 0 )) .animation(Animation.linear(duration: 1).repeatForever(autoreverses: false)) .onAppear { isVisible = true } } } extension View { func spinning() -> some View { self.modifier(Spinning()) } } PlaygroundPage.current.setLiveView( ContentView() )
This app used to be Amazing ... what happened on the last update ?