I use custom transitions to display a full-screen modal representation of the game. When the user launches the game, the root view controller scales down on the screen, while the full-screen game controller scales down from the larger scale on the display when switching from 0% opacity to 100% opacity. Plain!
The transition looks great and works great, and also correctly reverses the animation when the game view controller is turned off.
The problem that I encountered is that if the device is rotated while displaying the full-screen game controller, the layout is sluggish when you return to the controller of the root view. And further rotation does not fix the problem, the layout is screwed and remains screwed.
If I disable the use of custom transitions, this problem will disappear. Also, if I save the custom transition, but disconnects the calls by setting CATransform3D in my sources and in the views in the transition animation, the problem disappears again.
Here is my transitional delegate:
class FullscreenModalTransitionManager: NSObject, UIViewControllerAnimatedTransitioning, UIViewControllerTransitioningDelegate { private var presenting:Bool = true // MARK: UIViewControllerAnimatedTransitioning protocol methods func animateTransition(transitionContext: UIViewControllerContextTransitioning) { // get reference to our fromView, toView and the container view that we should perform the transition in let container = transitionContext.containerView() let fromView = transitionContext.viewForKey(UITransitionContextFromViewKey)! let toView = transitionContext.viewForKey(UITransitionContextToViewKey)! let scale:CGFloat = 1.075 //let bigScale = CGAffineTransformMakeScale(scale, scale) //let smallScale = CGAffineTransformMakeScale(1/scale,1/scale) let bigScale = CATransform3DMakeScale(scale, scale, 1) let smallScale = CATransform3DMakeScale(1/scale, 1/scale, 1) let smallOpacity:CGFloat = 0.5 let presenting = self.presenting if presenting { // when presenting, incoming view must be on top container.addSubview(fromView) container.addSubview(toView) toView.layer.transform = bigScale toView.opaque = false toView.alpha = 0 fromView.layer.transform = CATransform3DIdentity fromView.opaque = false fromView.alpha = 1 } else { // when !presenting, outgoing view must be on top container.addSubview(toView) container.addSubview(fromView) toView.layer.transform = smallScale toView.opaque = false toView.alpha = smallOpacity fromView.layer.transform = CATransform3DIdentity fromView.opaque = false fromView.alpha = 1 } let duration = self.transitionDuration(transitionContext) UIView.animateWithDuration(duration, delay: 0.0, usingSpringWithDamping: 0.7, initialSpringVelocity: 0, options: nil, animations: { if presenting { fromView.layer.transform = smallScale fromView.alpha = smallOpacity } else { fromView.layer.transform = bigScale fromView.alpha = 0 } }, completion: nil ) UIView.animateWithDuration(duration, delay: duration/6, usingSpringWithDamping: 0.7, initialSpringVelocity: 0.5, options: nil, animations: { toView.layer.transform = CATransform3DIdentity toView.alpha = 1 }, completion: { finished in transitionContext.completeTransition(true) }) } func transitionDuration(transitionContext: UIViewControllerContextTransitioning) -> NSTimeInterval { return 0.5 } // MARK: UIViewControllerTransitioningDelegate protocol methods func animationControllerForPresentedController(presented: UIViewController, presentingController presenting: UIViewController, sourceController source: UIViewController) -> UIViewControllerAnimatedTransitioning? { self.presenting = true return self } func animationControllerForDismissedController(dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? { self.presenting = false return self } }
And for visual reference, what my root view controller usually looks like:

And for visual reference, what does my root view controller look like if I rotate my device (at least once) while watching a game and return to the root view controller.

And one final note - just in case he calls any calls - I use the auto-detection and size classes to host my root view controller.
Thanks,