 import UIKit
 import pop
 
+public protocol CRDropdownAlertDelegate {
+    func dropdownAlertWasTapped(alert :CRDropdownAlert) -> Bool;
+}
+
 /// Inspired by: https://github.com/cwRichardKim/RKDropdownAlert and https://github.com/startupthekid/DropdownAlert/
-public class CRDropdownAlert: UIView {
+public class CRDropdownAlert: UIButton {
     
     // MARK: - Animation
     

     Common initialization function.
     */
    func commonInit() {
        self.titleLabel.font = Defaults.TitleFont
        self.messageLabel.font = Defaults.MessageFont
        
        self.addSubview(self.titleLabel)
        self.addSubview(self.messageLabel)
        self.setupConstraints()
    }
    
    /**
     Setup the constraints for the dropdown's labels.
     */
    private func setupConstraints() {
        self.addConstraint(NSLayoutConstraint(item: self.titleLabel, attribute: .centerX, relatedBy: .equal, toItem: self, attribute: .centerX, multiplier: 1, constant: 0))
        self.addConstraint(NSLayoutConstraint(item: self.titleLabel, attribute: .centerY, relatedBy: .equal, toItem: self, attribute: .centerY, multiplier: 1, constant: 0))
        self.addConstraint(NSLayoutConstraint(item: self.titleLabel, attribute: .width, relatedBy: .equal, toItem: self, attribute: .width, multiplier: 1, constant: 0))
        
        self.addConstraint(NSLayoutConstraint(item: self.messageLabel, attribute: .centerX, relatedBy: .equal, toItem: self, attribute: .centerX, multiplier: 1, constant: 0))
        self.addConstraint(NSLayoutConstraint(item: self.messageLabel, attribute: .top, relatedBy: .equal, toItem: self.titleLabel, attribute: .bottom, multiplier: 1, constant: Defaults.VerticalPadding))
        self.addConstraint(NSLayoutConstraint(item: self.messageLabel, attribute: .bottom, relatedBy: .equal, toItem: self, attribute: .bottom, multiplier: 1, constant: -Defaults.VerticalPadding))
        self.addConstraint(NSLayoutConstraint(item: self.messageLabel, attribute: .width, relatedBy: .equal, toItem: self, attribute: .width, multiplier: 1, constant: 0))
        

            
            window.layoutIfNeeded()
            
            let titleFrame = dropdown.titleText.frame;
            let titleHeight = titleFrame.size.height;
            let messageFrame = dropdown.messageLabel.frame;
            let messageHeight = messageFrame.size.height;
