         } else {
             buttonLabel.text = "OK"
         }
-        modalButton.addSubview(buttonLabel)
+        dismissButton.addSubview(buttonLabel)
         
         // Animate it in
         self.view.alpha = 0

        self.viewHeight = size.height
        
        var yPos:CGFloat = 0.0
        var contentWidth:CGFloat = self.modalWidth - (self.modalPadding*2)
        
        // position the icon image view, if there is one
        if self.iconImageView != nil {
            yPos += iconImageView.frame.height
            var centerX = (self.modalWidth-self.iconImageView.frame.width)/2
            self.iconImageView.frame.origin = CGPoint(x: centerX, y: self.modalPadding)
            yPos += modalPadding
        }
        
        // position the title
        let titleString = modalTitleLabel.text! as NSString
        let titleAttr = [NSFontAttributeName:modalTitleLabel.font]
        let titleSize = CGSize(width: contentWidth, height: 90)
        let titleRect = titleString.boundingRectWithSize(titleSize, options: NSStringDrawingOptions.UsesLineFragmentOrigin, attributes: titleAttr, context: nil)
        yPos += modalPadding
        self.modalTitleLabel.frame = CGRect(x: self.modalPadding, y: yPos, width: self.modalWidth - (self.modalPadding*2), height: ceil(titleRect.size.height))
        yPos += ceil(titleRect.size.height)
        
        
        // position text
        if self.modalTextView != nil {
            let textString = modalTextView.text! as NSString
            let textAttr = [NSFontAttributeName:modalTextView.font]
            let textSize = CGSize(width: contentWidth, height: 90)
            let textRect = textString.boundingRectWithSize(textSize, options: NSStringDrawingOptions.UsesLineFragmentOrigin, attributes: textAttr, context: nil)
            self.modalTextView.frame = CGRect(x: self.modalPadding, y: yPos, width: self.modalWidth - (self.modalPadding*2), height: ceil(textRect.size.height)*2)
            yPos += ceil(textRect.size.height) + modalPadding/2
        }
        
        // position the button
        yPos += self.modalPadding
        self.modalButton.frame = CGRect(x: 0, y: yPos, width: self.modalWidth, height: self.buttonHeight)
        if self.buttonLabel != nil {
            self.buttonLabel.frame = CGRect(x: self.modalPadding, y: (self.buttonHeight/2) - 15, width: self.modalWidth - (self.modalPadding*2), height: 30)
        }
        yPos += self.buttonHeight
        
        // size the background view
        self.modalBackgroundView.frame = CGRect(x: 0, y: 0, width: self.modalWidth, height: yPos)
        
        // size the container that holds everything together
        self.containerView.frame = CGRect(x: (self.viewWidth!-self.modalWidth)/2, y: (self.viewHeight! - yPos)/2, width: self.modalWidth, height: yPos)
    }
    
    
    
    func info(viewController: UIViewController, title: String, text: String?=nil) -> JSSAlertViewResponder {
        return self.show(viewController, title: title, text: text, buttonText: nil, color: UIColorFromHex(0x3498db, alpha: 1))
    }
    
    func success(viewController: UIViewController, title: String, text: String?=nil) -> JSSAlertViewResponder {
        return self.show(viewController, title: title, text: text, buttonText: nil, color: UIColorFromHex(0x2ecc71, alpha: 1))
    }
    
    func warning(viewController: UIViewController, title: String, text: String?=nil) -> JSSAlertViewResponder {
        return self.show(viewController, title: title, text: text, buttonText: nil, color: UIColorFromHex(0xf1c40f, alpha: 1))
    }
    
    func danger(viewController: UIViewController, title: String, text: String?=nil) -> JSSAlertViewResponder {
        return self.show(viewController, title: title, text: text, buttonText: nil, color: UIColorFromHex(0xe74c3c, alpha: 1))
    }
    
    func show(viewController: UIViewController, title: String, text: String?=nil, buttonText: String?=nil, color: UIColor?=nil, iconImage: UIImage?=nil) -> JSSAlertViewResponder {

        self.view.addSubview(self.containerView!)
        
        // Background view/main color
        self.alertBackgroundView = UIView()
        alertBackgroundView.backgroundColor = baseColor
        alertBackgroundView.layer.cornerRadius = 4
        alertBackgroundView.layer.masksToBounds = true
        self.containerView.addSubview(alertBackgroundView!)
        
        // Icon
        self.iconImage = iconImage
