             case .None:
                 self.animatedView = nil
             }
-
+            
             self.titleLabel.text = title
             
             if subTitle != nil {

            nil)
        userAction = action
        return self

    }

    func showAlert(title: String, subTitle: String?, style: AlertStyle,buttonTitle: String,buttonColor: UIColor,otherButtonTitle:
        String?, action: ((isOtherButton: Bool) -> Void)? = nil) -> SweetAlert {
            self.showAlert(title, subTitle: subTitle, style: style, buttonTitle: buttonTitle,buttonColor: buttonColor,otherButtonTitle:
                otherButtonTitle,otherButtonColor: UIColor.redColor())
            userAction = action
            return self

    }
    
    func showAlert(title: String, subTitle: String?, style: AlertStyle,buttonTitle: String,buttonColor: UIColor,otherButtonTitle:
        String?, otherButtonColor: UIColor?,action: ((isOtherButton: Bool) -> Void)? = nil) {
            userAction = action
            let window = UIApplication.sharedApplication().keyWindow?.subviews.first as UIView
            window.addSubview(view)
            view.frame = window.bounds
            self.setupContentView()
            self.setupTitleLabel()
            self.setupSubtitleTextView()
 
            
            switch style {
                

            
            buttons = []
            if buttonTitle.isEmpty == false {
                
                var button: UIButton = UIButton.buttonWithType(UIButtonType.Custom) as! UIButton
                button.setTitle(buttonTitle, forState: UIControlState.Normal)
                button.backgroundColor = buttonColor
                button.userInteractionEnabled = true
                button.tag = 0
                buttons.append(button)
                
                
            }
            
            if otherButtonTitle != nil && otherButtonTitle!.isEmpty == false {
                
                var button: UIButton = UIButton.buttonWithType(UIButtonType.Custom) as! UIButton
                button.setTitle(otherButtonTitle, forState: UIControlState.Normal)
                button.backgroundColor = otherButtonColor
                button.addTarget(self, action: "pressed:", forControlEvents: UIControlEvents.TouchUpInside)
                button.tag = 1
                buttons.append(button)
            }
            
            resizeAndRelayout()
            
            if SweetAlertContext.shouldNotAnimate == true {
                
                //Do not animate Alert
                if self.animatedView != nil {
                    self.animatedView!.animate()
                }
                
            }
            else {
                
                animateAlert()
            }
    }
    
    func animateAlert() {
        
        view.alpha = 0;
        UIView.animateWithDuration(0.1, animations: { () -> Void in
            self.view.alpha = 1.0;
        })
        
        var previousTransform = self.contentView.transform
        self.contentView.layer.transform = CATransform3DMakeScale(0.9, 0.9, 0.0);
        
        UIView.animateWithDuration(0.2, animations: { () -> Void in
            
            self.contentView.layer.transform = CATransform3DMakeScale(1.1, 1.1, 0.0);
