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.
This commit is contained in:
parent
95b215c6b5
commit
34a01094f7
|
@ -48,7 +48,7 @@ class LargeImageExpandAnimationController: NSObject, UIViewControllerAnimatedTra
|
||||||
}
|
}
|
||||||
|
|
||||||
let containerView = transitionContext.containerView
|
let containerView = transitionContext.containerView
|
||||||
|
containerView.addSubview(toVC.view)
|
||||||
|
|
||||||
let finalVCFrame = transitionContext.finalFrame(for: toVC)
|
let finalVCFrame = transitionContext.finalFrame(for: toVC)
|
||||||
guard let sourceView = toVC.animationSourceView,
|
guard let sourceView = toVC.animationSourceView,
|
||||||
|
@ -85,7 +85,6 @@ class LargeImageExpandAnimationController: NSObject, UIViewControllerAnimatedTra
|
||||||
imageView.layer.maskedCorners = sourceView.layer.maskedCorners
|
imageView.layer.maskedCorners = sourceView.layer.maskedCorners
|
||||||
imageView.layer.masksToBounds = true
|
imageView.layer.masksToBounds = true
|
||||||
|
|
||||||
containerView.addSubview(toVC.view)
|
|
||||||
containerView.addSubview(imageView)
|
containerView.addSubview(imageView)
|
||||||
|
|
||||||
let duration = transitionDuration(using: transitionContext)
|
let duration = transitionDuration(using: transitionContext)
|
||||||
|
|
Loading…
Reference in New Issue