I am writing an interactive transition via UIViewControllerAnimatedTransitioning
. As part of the transition, I apply a CGAffineTransform
to the from view controller
.
As soon as the transform is applied, fromViewController loses its safeAreaInset at the top. This looks jarring.
Here is a pic just before the transition starts. Normal status bar, navigation bar, and safe area insets (top). Around 88 points high.
This is the first frame of the transition. Notice that the top spacing is now more like 44 points.
The fromVC remains this way all the way through the transition. I have tried different ways of applying the transforms, but they all behave the same way. I have also removed the rounded corners.
Here are the transforms:
var transform = CGAffineTransform.identity
transform.concatenating(CGAffineTransform.identity.translatedBy(x: 0, y: yInset / 2))
transform.concatenating(CGAffineTransform.identity.scaledBy(x: scaleX, y: scaleY))
fromVC.view.transform = transform