Skip to content

Instantly share code, notes, and snippets.

@jacobsapps
Created August 9, 2025 13:34
Show Gist options
  • Save jacobsapps/5c6d0029f368ee9f6a459a81fc137874 to your computer and use it in GitHub Desktop.
Save jacobsapps/5c6d0029f368ee9f6a459a81fc137874 to your computer and use it in GitHub Desktop.
struct ProgressKeyframes {
var progress: Double = 0.0
}
@State private var currentProgress: Double = 0.0
@State private var animationStartTime: Date = Date()
private var progressTimeline: KeyframeTimeline<ProgressKeyframes> {
KeyframeTimeline(initialValue: ProgressKeyframes()) {
KeyframeTrack(\.progress) {
CubicKeyframe(0.8, duration: 2.0)
LinearKeyframe(1.0, duration: 3.0)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment