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

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

16 lines
656 B
Swift
Raw Normal View History

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