     }
 
 }
+

    func animateIn() {
        self.view.addSubview(alertBox)
        
        // Offset
        alertBox.center.y = self.view.frame.minY // Start off at the top
        
        alertBox.alpha = 0
        
        let animationDuration = 0.5
        UIView.animateKeyframes(withDuration: animationDuration, delay: 0.0, options: [], animations: { 
            
            UIView.addKeyframe(withRelativeStartTime: 0, relativeDuration: 2/3, animations: {
                if self.shouldBlur { self.visualEffectView.effect = self.effect }
                self.alertBox.center = self.view.center
                self.alertBox.alpha = 1.0
            })
            
            // Bounce up
            UIView.addKeyframe(withRelativeStartTime: 0.7, relativeDuration: 1/3, animations: {
                self.alertBox.center.y -= 30
            })
            
            // Bounce down
            UIView.addKeyframe(withRelativeStartTime: 0.9, relativeDuration: 1/3, animations: {
                self.alertBox.center.y += 30
            })
        })

    }
    
    func animteOutAndDismiss() {

        UIView.animate(withDuration: 0.4, animations: {
            if self.shouldBlur { self.visualEffectView.effect = nil }
            self.alertBox.transform = CGAffineTransform.init(scaleX: 1.3, y: 1.3)
            self.alertBox.alpha = 0
            self.alertBox.center.y = self.view.frame.maxY
            }) { _ in

    var alertMessage: String?
    var buttonText: String?
    var buttonColor: UIColor?
    var animationDuration: TimeInterval?
    var delegate: BlurAlertControllerDelegate?
    
    var shouldBlur = true
