diff --git a/Packages/GalleryVC/Sources/GalleryVC/GalleryDismissAnimationController.swift b/Packages/GalleryVC/Sources/GalleryVC/GalleryDismissAnimationController.swift index c15fc4ea..6cc15997 100644 --- a/Packages/GalleryVC/Sources/GalleryVC/GalleryDismissAnimationController.swift +++ b/Packages/GalleryVC/Sources/GalleryVC/GalleryDismissAnimationController.swift @@ -52,6 +52,9 @@ class GalleryDismissAnimationController: NSObject, UIViewControllerAnimatedTrans appliedSourceToDestTransform = false } + to.view.frame = container.bounds + from.view.frame = container.bounds + let content = itemViewController.takeContent() content.view.translatesAutoresizingMaskIntoConstraints = true content.view.layer.masksToBounds = true @@ -112,6 +115,8 @@ class GalleryDismissAnimationController: NSObject, UIViewControllerAnimatedTrans return } + toVC.view.frame = transitionContext.containerView.bounds + fromVC.view.frame = transitionContext.containerView.bounds transitionContext.containerView.addSubview(toVC.view) transitionContext.containerView.addSubview(fromVC.view) diff --git a/Packages/GalleryVC/Sources/GalleryVC/GalleryPresentationAnimationController.swift b/Packages/GalleryVC/Sources/GalleryVC/GalleryPresentationAnimationController.swift index f7a6d8a9..6d789b72 100644 --- a/Packages/GalleryVC/Sources/GalleryVC/GalleryPresentationAnimationController.swift +++ b/Packages/GalleryVC/Sources/GalleryVC/GalleryPresentationAnimationController.swift @@ -121,8 +121,9 @@ class GalleryPresentationAnimationController: NSObject, UIViewControllerAnimated return } - transitionContext.containerView.addSubview(to.view) to.view.alpha = 0 + to.view.frame = transitionContext.containerView.bounds + transitionContext.containerView.addSubview(to.view) let duration = transitionDuration(using: transitionContext) let animator = UIViewPropertyAnimator(duration: duration, curve: .easeInOut)