From 34a01094f76533f6af99db7779084603a5fc0b73 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Sat, 12 Sep 2020 11:34:46 -0400 Subject: [PATCH] Fix gallery expand animation description not starting at correct position Safe are insets weren't being taken into account when hiding the controls, because the toVC had not yet been added to the container view and thus didn't have anything to receive insets from. --- .../Transitions/LargeImageExpandAnimationController.swift | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Tusker/Screens/Large Image/Transitions/LargeImageExpandAnimationController.swift b/Tusker/Screens/Large Image/Transitions/LargeImageExpandAnimationController.swift index c0dc4941ae..9738e93ace 100644 --- a/Tusker/Screens/Large Image/Transitions/LargeImageExpandAnimationController.swift +++ b/Tusker/Screens/Large Image/Transitions/LargeImageExpandAnimationController.swift @@ -48,7 +48,7 @@ class LargeImageExpandAnimationController: NSObject, UIViewControllerAnimatedTra } let containerView = transitionContext.containerView - + containerView.addSubview(toVC.view) let finalVCFrame = transitionContext.finalFrame(for: toVC) guard let sourceView = toVC.animationSourceView, @@ -85,7 +85,6 @@ class LargeImageExpandAnimationController: NSObject, UIViewControllerAnimatedTra imageView.layer.maskedCorners = sourceView.layer.maskedCorners imageView.layer.masksToBounds = true - containerView.addSubview(toVC.view) containerView.addSubview(imageView) let duration = transitionDuration(using: transitionContext)