co-maps/iphone/Maps/Classes/Components/Modal/FadeOutAnimatedTransitioning.swift

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
658 B
Swift
Raw Normal View History

2025-11-22 13:58:55 +01:00
final class FadeOutAnimatedTransitioning: NSObject, UIViewControllerAnimatedTransitioning {
func transitionDuration(using transitionContext: UIViewControllerContextTransitioning?) -> TimeInterval {
return kDefaultAnimationDuration
}
func animateTransition(using transitionContext: UIViewControllerContextTransitioning) {
guard let presentedView = transitionContext.view(forKey: .from) else { return }
UIView.animate(withDuration: transitionDuration(using: transitionContext),
animations: {
presentedView.alpha = 0
}) { finished in
transitionContext.completeTransition(finished)
}
}
}