public override void AnimateTransition(IUIViewControllerContextTransitioning transitionContext)
            {
                var toViewController = transitionContext.GetViewControllerForKey(UITransitionContext.ToViewControllerKey);
                var containerView    = transitionContext.ContainerView;

                var animationDuration = TransitionDuration(transitionContext);

                var animation = (CASpringAnimation)CASpringAnimation.FromKeyPath("position.y");

                animation.Damping         = 10;
                animation.InitialVelocity = 20;
                animation.Mass            = 1;
                animation.Stiffness       = 100;
                animation.From            = FromObject(containerView.Bounds.Height);
                animation.To                = FromObject(UIScreen.MainScreen.Bounds.Height / 2);
                animation.Duration          = TransitionDuration(transitionContext);
                animation.AnimationStopped += delegate
                {
                    transitionContext.CompleteTransition(true);
                };

                toViewController.View.Layer.AddAnimation(animation, null);

                containerView.AddSubview(toViewController.View);
            }