From 81f5549f54fa14e8b251b2cf3616507ef3ac5166 Mon Sep 17 00:00:00 2001 From: Lukas Korba Date: Tue, 6 Dec 2022 09:05:01 +0100 Subject: [PATCH] [#184] ProgressView is no longer .easeInOut animated (#502) - the API without value apparently works differently or even has a bug inside, Apple deprecated it and animation:value: is supposed to be used instead --- secant/UI Components/Drawer/Drawer.swift | 2 +- .../ProgressIndicators/OnboardingProgressIndicator.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/secant/UI Components/Drawer/Drawer.swift b/secant/UI Components/Drawer/Drawer.swift index db33966..dc3a510 100644 --- a/secant/UI Components/Drawer/Drawer.swift +++ b/secant/UI Components/Drawer/Drawer.swift @@ -56,7 +56,7 @@ struct Drawer: View { .cornerRadius(16.0) .frame(height: proxy.size.height, alignment: .bottom) .offset(y: max(offset + translation, 0)) - .animation(.interactiveSpring()) + .animation(.interactiveSpring(), value: translation) .gesture( DragGesture().updating($translation) { value, state, _ in state = value.translation.height diff --git a/secant/UI Components/ProgressIndicators/OnboardingProgressIndicator.swift b/secant/UI Components/ProgressIndicators/OnboardingProgressIndicator.swift index 5e80831..8f2fd27 100644 --- a/secant/UI Components/ProgressIndicators/OnboardingProgressIndicator.swift +++ b/secant/UI Components/ProgressIndicators/OnboardingProgressIndicator.swift @@ -52,7 +52,7 @@ struct OnboardingProgressStyle: ProgressViewStyle { } } .frame(height: height) - // FIXME: .animation(.easeInOut) breaks the Onboarding UI when onAppear, fallback to .linear for now + .animation(.easeInOut, value: fractionCompleted) } } }