Fix non-interactive dismiss animation timing
This commit is contained in:
parent
ab77ad89b4
commit
aa0f5192ea
|
@ -14,7 +14,7 @@ class SheetContainerDismissAnimationController: NSObject, UIViewControllerAnimat
|
||||||
if UIAccessibility.prefersCrossFadeTransitionsBackwardsCompat && (transitionContext?.viewController(forKey: .from) as? SheetContainerViewController)?.dismissAnimationInitialVelocity == nil {
|
if UIAccessibility.prefersCrossFadeTransitionsBackwardsCompat && (transitionContext?.viewController(forKey: .from) as? SheetContainerViewController)?.dismissAnimationInitialVelocity == nil {
|
||||||
return 0.25
|
return 0.25
|
||||||
} else {
|
} else {
|
||||||
return 0.5
|
return 0.35
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ class SheetContainerDismissAnimationController: NSObject, UIViewControllerAnimat
|
||||||
let parameters = UISpringTimingParameters(dampingRatio: damping, initialVelocity: vector)
|
let parameters = UISpringTimingParameters(dampingRatio: damping, initialVelocity: vector)
|
||||||
animator = UIViewPropertyAnimator(duration: duration, timingParameters: parameters)
|
animator = UIViewPropertyAnimator(duration: duration, timingParameters: parameters)
|
||||||
} else {
|
} else {
|
||||||
animator = UIViewPropertyAnimator(duration: duration, curve: .easeOut)
|
animator = UIViewPropertyAnimator(duration: duration, curve: .easeInOut)
|
||||||
}
|
}
|
||||||
|
|
||||||
animator.addAnimations {
|
animator.addAnimations {
|
||||||
|
|
Loading…
Reference in New Issue