From e21dceb3b30c7a89c1c2ef374c65bd499d50d51a Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Sat, 12 Sep 2020 10:48:57 -0400 Subject: [PATCH] Tweak gallery spring animation parameters --- .../Transitions/LargeImageExpandAnimationController.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tusker/Screens/Large Image/Transitions/LargeImageExpandAnimationController.swift b/Tusker/Screens/Large Image/Transitions/LargeImageExpandAnimationController.swift index 3d1ff9871b..c0dc4941ae 100644 --- a/Tusker/Screens/Large Image/Transitions/LargeImageExpandAnimationController.swift +++ b/Tusker/Screens/Large Image/Transitions/LargeImageExpandAnimationController.swift @@ -38,7 +38,7 @@ extension LargeImageAnimatableViewController { class LargeImageExpandAnimationController: NSObject, UIViewControllerAnimatedTransitioning { func transitionDuration(using transitionContext: UIViewControllerContextTransitioning?) -> TimeInterval { - return 0.5 + return 0.4 } func animateTransition(using transitionContext: UIViewControllerContextTransitioning) { @@ -90,7 +90,7 @@ class LargeImageExpandAnimationController: NSObject, UIViewControllerAnimatedTra let duration = transitionDuration(using: transitionContext) let velocity = 1 / CGFloat(duration) - UIView.animate(withDuration: duration, delay: 0, usingSpringWithDamping: 0.65, initialSpringVelocity: velocity, options: []) { + UIView.animate(withDuration: duration, delay: 0, usingSpringWithDamping: 0.75, initialSpringVelocity: velocity, options: []) { imageView.frame = finalFrame imageView.layer.cornerRadius = 0 toVC.view.alpha = 1