         let maxDuration: CGFloat = 0.5
         return (NSTimeInterval)(max(min(maxDuration, d / v), minDuration))
     }
+    
 }

        container.addSubview(shadowView)
        container.addSubview(toView)
        
        UIView.animateWithDuration(self.defaultDuration,
            animations: { () -> Void in
                shadowView.alpha = 0.5
                let maxOffset = container.width / 3.0
                fromView.transform = CGAffineTransformMakeTranslation(-maxOffset, 0)
                toView.transform = CGAffineTransformIdentity
            }) { (completed) -> Void in


    // MARK: UIViewControllerAnimatedTransitioning
    
    @objc func transitionDuration(transitionContext: UIViewControllerContextTransitioning?) -> NSTimeInterval {
        return defaultDuration
    }

    @objc func animateTransition(transitionContext: UIViewControllerContextTransitioning) {
        if (self.operation == .Push) {
            self.push(transitionContext)
        }
