RotatingRecordModel
class RotatingRecordModel : ObservableObject
The model to observe RotatingRecord
-
Do we want to rotate or not?
Declaration
Swift
private var rotate: Bool
-
Are we rotating or not?
Declaration
Swift
@Published var rotating: Bool { get set }
-
A flip/flop when a rotation is completed
Declaration
Swift
var status: Bool { get set }
-
The animation
Declaration
Swift
var foreverAnimation: Animation { get }
-
startRotating()
AsynchronousStart the rotating animation
Declaration
Swift
@MainActor func startRotating() async
-
Stop the rotating animation
Note
the animation will only stop when the rotating is completedDeclaration
Swift
func stopRotating()
-
The rotate animation
Note
A ‘GeometryEffect’ instead of a simple animation so we can observe itDeclaration
Swift
struct Rotate : GeometryEffect, @unchecked Sendable