  func animateTransition(transitionContext: UIViewControllerContextTransitioning) {     self.transitionContext = transitionContext      guard let toViewController: UIViewController = transitionContext.viewControllerForKey(UITransitionContextToViewControllerKey) else {         