RotatingView
public struct RotatingView<Content: View>: View
A SwiftUI View that can rotate with a smooth start and stop
-
Public init
Declaration
Swift
public init(speed: Double, rotate: Bool, @ViewBuilder content: () -> Content) -
The speed of the rotation
Declaration
Swift
let speed: Double -
Bool if the view should rotate
Declaration
Swift
let rotate: Bool -
The content of the
ViewDeclaration
Swift
let content: Content -
The current rotation speed
Declaration
Swift
private var currentSpeed: Double = 0.0 -
Bool to trigger the animation
Declaration
Swift
private var animate = false -
The body of the
ViewDeclaration
Swift
public var body: some View
View on GitHub