Fix gallery crossfade transition not working when gallery presented from modally-presented VC
This commit is contained in:
parent
fabb5cd257
commit
bf9ec17513
@ -168,10 +168,17 @@ class GalleryDismissAnimationController: NSObject, UIViewControllerAnimatedTrans
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let container = transitionContext.containerView
|
||||||
|
|
||||||
|
// See comment above.
|
||||||
|
if toVC.view.superview == nil {
|
||||||
|
toVC.view.frame = container.bounds
|
||||||
|
container.addSubview(toVC.view)
|
||||||
|
}
|
||||||
|
|
||||||
toVC.view.frame = transitionContext.containerView.bounds
|
toVC.view.frame = transitionContext.containerView.bounds
|
||||||
fromVC.view.frame = transitionContext.containerView.bounds
|
fromVC.view.frame = transitionContext.containerView.bounds
|
||||||
transitionContext.containerView.addSubview(toVC.view)
|
container.addSubview(fromVC.view)
|
||||||
transitionContext.containerView.addSubview(fromVC.view)
|
|
||||||
|
|
||||||
let duration = transitionDuration(using: transitionContext)
|
let duration = transitionDuration(using: transitionContext)
|
||||||
let animator = UIViewPropertyAnimator(duration: duration, curve: .easeInOut)
|
let animator = UIViewPropertyAnimator(duration: duration, curve: .easeInOut)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user