         let (startingRect, endingRect) = getTransitionCGRectsForTransitionStyle(self, modalViewController: modalViewController, transitionStyle: transitionStyle)
         jModalStartingRect = JRect(rect: startingRect)
         jModalEndingRect = JRect(rect: endingRect)
-        addOverlay(dismissAnimationDuration: animationDuration)
+        let overlayBackgroundColor = UIColor(white: 0, alpha: 0.3)
+        addOverlay(dismissAnimationDuration: animationDuration, overlayBackgroundColor)
         modalViewController.view.frame = startingRect
         self.view.clipsToBounds = false
         let window = UIApplication.sharedApplication().keyWindow
         window?.addSubview(modalViewController.view)
         let t = CGAffineTransformScale(CGAffineTransformIdentity, 0.93, 0.93)
         UIView.animateWithDuration(animationDuration, delay: 0, options: UIViewAnimationOptions.CurveEaseOut, animations: {
+            self.jOverlay.backgroundColor = overlayBackgroundColor
             modalViewController.view.userInteractionEnabled = true
             modalViewController.view.frame = endingRect
             self.view.transform = t

    public func dismissModal(animationDuration : NSTimeInterval) {
        let t = CGAffineTransformScale(CGAffineTransformIdentity, 1, 1)
        UIView.animateWithDuration(animationDuration, delay: 0, options: UIViewAnimationOptions.CurveEaseOut, animations: {
            self.jOverlay.removeFromSuperview()
            self.jOverlay = nil
            self.jModal.view.userInteractionEnabled = false
            self.jModal.view.frame = self.jModalStartingRect.rect
            self.view.transform = t
            self.view.layoutIfNeeded()
            }, completion: { (_) in
                self.jModal.view.removeFromSuperview()
                self.jModal = nil
                self.view.toggleSubviewsUserInteractionEnabled(true)

        
        self.view.toggleSubviewsUserInteractionEnabled(false)
        jOverlay = UIView(frame: self.view.frame)
        jOverlay.backgroundColor = UIColor.clearColor()
        jOverlay.userInteractionEnabled = true
        jDismissAnimationDuration = dismissAnimationDuration
        let tap = UITapGestureRecognizer(target: self, action: #selector(dismissModalByOverlay))
        jOverlay.addGestureRecognizer(tap)
        let window = UIApplication.sharedApplication().keyWindow
        window?.addSubview(jOverlay)
//        self.view.addSubview(jOverlay)
    }
    
    public func dismissModalByOverlay(recognizer : UITapGestureRecognizer) {
