I'm doing some experiments with animated transition for Pop and Push in UINavigationController and I have some problems with Pop animation.In brief, it seems that in the Pop animation when the toView is created the system remember the final positin of the view in the Push Animation but not the rotation and, in my case the view is created with swapped width and height.This is the code for the Push Animation: func animateTransition(transitionContext: UIViewControllerContextTransitioning) { let container = transitionContext.containerView()! let fromView = transitionContext.viewForKey(UITransitionContextFromViewKey)! let toView = transitionContext.viewForKey(UITransitionContextToViewKey)! print(Push Start Frame: (fromView.frame)) let π : CGFloat = 3.14159265359 let offScreenRight = CGAffineTransformMakeRotation(-π/2) let offScreenLeft = CGAffineTransformMakeRotation(π/2) toView.transform = self.presenting ? offScreenRight : offScreenLeft toView.layer.anchorPoint = CGPoint(x:0, y:0) from
0
0
597