     
     /// Tracks wether an alert is in the process of being transitioned in / out:
     /// - if true we defer other animations until after the transition has finished using the `setVisibleAnimationCompletion`
-    private var setVisibleAnimationInProgress: Bool = false
-    private var setVisibleAnimationCompletion: (() -> Void)? = nil
+    private var visibilityAnimation: UIViewPropertyAnimator? = nil
+    private var resetVisibilityAnimation: Bool = true
+    
     
     /**
      *  Initialize with a title and / or message

enum URBNSwAlertType {
    case fullCustom, customView, customButton, fullStandard
}


            UIView.animate(withDuration: TimeInterval(0.1), animations: { [weak self] in
                guard let strongSelf = self else { return }
                strongSelf.view.layoutIfNeeded()
                }, completion: completion)
        }
        
        if let visibilityAnimation = visibilityAnimation,
            visibilityAnimation.isRunning {
            self.visibilityAnimation?.addCompletion { (_) in
                keyboardWillHideAnimation()
            }
        }
        else {
