         guard let transitionContext = activeContext else {
             return false
         }
+
+        let velocity = RTL ? velocity.flippingX : velocity
+        let translation = RTL ? translation.flippingX : translation
         
         let container = transitionContext.containerView
-        
         let percent = percentDismissedForTranslation(translation, container: container)
         
         return ((percent < minimumDismissalPercentage && velocity.x < 100.0) || velocity.x < 0)

    }
    
}

    
    private func commonInit() {
        var dropShadowFrame = dropShadowView.frame
        if RTL {
            dropShadowFrame.origin.x = bounds.width
        } else {
            dropShadowFrame.origin.x = 0 - dropShadowFrame.size.width
        }
        dropShadowFrame.origin.y = 0
        dropShadowFrame.size.height = bounds.size.height
        dropShadowView.frame = dropShadowFrame
