    }
    
    func transitionDuration(transitionContext: UIViewControllerContextTransitioning?) -> NSTimeInterval {
-      return 0.3
+      return 0.25
    }
    
    // MARK: - UIViewControllerTransitioningDelegate protocol methods

      let container = transitionContext.containerView()!
      
      let fromController = transitionContext.viewControllerForKey(UITransitionContextFromViewControllerKey) as! MenuController
      
      container.addSubview(fromController.view)
      
      let duration = transitionDuration(transitionContext)
      UIView.animateWithDuration(duration, animations: {
         
         fromController.dialogContainer.transform = CGAffineTransformMakeScale(0.01, 0.01)
         fromController.view.backgroundColor = UIColor.clearColor()
         
         }, completion: { finished in
            transitionContext.completeTransition(true)

      
      let toController = transitionContext.viewControllerForKey(UITransitionContextToViewControllerKey) as! MenuController
      
      let scaledTransform = CGAffineTransformMakeScale(0.4, 0.4)
      toController.dialogContainer.transform = scaledTransform
      
      toController.view.alpha = 1
      toController.view.backgroundColor = UIColor.clearColor()
      
      container.addSubview(toController.view)
      
      let duration = transitionDuration(transitionContext)
      UIView.animateWithDuration(duration, delay: 0, options: UIViewAnimationOptions.CurveEaseOut, animations: { () -> Void in
         
         toController.dialogContainer.transform = CGAffineTransformIdentity
         toController.view.backgroundColor = UIColor.blackColor().colorWithAlphaComponent(0.5)
