Commit 0fc899f0 by Daniel Dahan

fixed container issue when transitioning

parent acba9aeb
...@@ -493,7 +493,8 @@ extension Motion { ...@@ -493,7 +493,8 @@ extension Motion {
fileprivate func prepareTransitionSnapshot() { fileprivate func prepareTransitionSnapshot() {
transitionSnapshot = fromView.transitionSnapshot(afterUpdates: true, shouldHide: false) transitionSnapshot = fromView.transitionSnapshot(afterUpdates: true, shouldHide: false)
transitionSnapshot.frame = containerView.bounds transitionSnapshot.frame = fromView.bounds
print("FROM", fromView.bounds, toView.bounds, transitionSnapshot.frame)
containerView.insertSubview(transitionSnapshot, aboveSubview: fromView) containerView.insertSubview(transitionSnapshot, aboveSubview: fromView)
} }
...@@ -510,7 +511,8 @@ extension Motion { ...@@ -510,7 +511,8 @@ extension Motion {
} }
fileprivate func prepareTransitionView() { fileprivate func prepareTransitionView() {
transitionView.frame = containerView.bounds transitionView.frame = toView.bounds
print("TO", toView.bounds)
transitionView.isUserInteractionEnabled = false transitionView.isUserInteractionEnabled = false
containerView.insertSubview(transitionView, belowSubview: transitionSnapshot) containerView.insertSubview(transitionView, belowSubview: transitionSnapshot)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment