 
         iconImageView = UIImageView()
         iconImageView.translatesAutoresizingMaskIntoConstraints = false
-        iconImageView.backgroundColor = UIColor.clear
+        iconImageView.backgroundColor = UIColor.clearColor()
         iconImageView.contentMode = iconContentMode
         self.addSubview(iconImageView)
 
         messageLabel = UILabel()
         messageLabel.translatesAutoresizingMaskIntoConstraints = false
-        messageLabel.textColor = UIColor.white
+        messageLabel.textColor = UIColor.whiteColor()
         messageLabel.font = messageTextFont
-        messageLabel.backgroundColor = UIColor.clear
-        messageLabel.lineBreakMode = .byWordWrapping
+        messageLabel.backgroundColor = UIColor.clearColor()
+        messageLabel.lineBreakMode = .ByWordWrapping
         messageLabel.numberOfLines = 2
-        messageLabel.textAlignment = .left
+        messageLabel.textAlignment = .Left
         messageLabel.text = message
         self.addSubview(messageLabel)
 
         actionButton = UIButton()
         actionButton.translatesAutoresizingMaskIntoConstraints = false
-        actionButton.backgroundColor = UIColor.clear
+        actionButton.backgroundColor = UIColor.clearColor()
         actionButton.titleLabel?.font = actionTextFont
         actionButton.titleLabel?.adjustsFontSizeToFitWidth = true
-        actionButton.setTitle(actionText, for: .normal)
-        actionButton.setTitleColor(actionTextColor, for: .normal)
-        actionButton.addTarget(self, action: #selector(doAction(button:)), for: .touchUpInside)
+        actionButton.setTitle(actionText, forState: .Normal)
+        actionButton.setTitleColor(actionTextColor, forState: .Normal)
+        actionButton.addTarget(self, action: #selector(doAction(_:)), forControlEvents: .TouchUpInside)
         self.addSubview(actionButton)
 
         secondActionButton = UIButton()
         secondActionButton.translatesAutoresizingMaskIntoConstraints = false
-        secondActionButton.backgroundColor = UIColor.clear
+        secondActionButton.backgroundColor = UIColor.clearColor()
         secondActionButton.titleLabel?.font = secondActionTextFont
         secondActionButton.titleLabel?.adjustsFontSizeToFitWidth = true
-        secondActionButton.setTitle(secondActionText, for: .normal)
-        secondActionButton.setTitleColor(secondActionTextColor, for: .normal)
-        
-        secondActionButton.addTarget(self, action: #selector(doAction(button:)), for: .touchUpInside)
+        secondActionButton.setTitle(secondActionText, forState: .Normal)
+        secondActionButton.setTitleColor(secondActionTextColor, forState: .Normal)
+        secondActionButton.addTarget(self, action: #selector(doAction(_:)), forControlEvents: .TouchUpInside)
         self.addSubview(secondActionButton)
 
         seperateView = UIView()
         seperateView.translatesAutoresizingMaskIntoConstraints = false
-        seperateView.backgroundColor = UIColor.gray
+        seperateView.backgroundColor = UIColor.grayColor()
         self.addSubview(seperateView)
 
-        activityIndicatorView = UIActivityIndicatorView(activityIndicatorStyle: .white)
+        activityIndicatorView = UIActivityIndicatorView(activityIndicatorStyle: .White)
         activityIndicatorView.translatesAutoresizingMaskIntoConstraints = false
         activityIndicatorView.stopAnimating()
         self.addSubview(activityIndicatorView)
 
         // Add constraints
-        let hConstraints: [NSLayoutConstraint] = NSLayoutConstraint.constraints(
-        withVisualFormat: "H:|-2@500-[iconImageView]-2-[messageLabel]-2-[seperateView(0.5)]-2-[actionButton]-0-[secondActionButton]-4-|",
+        let hConstraints: [NSLayoutConstraint] = NSLayoutConstraint.constraintsWithVisualFormat(
+        "H:|-2@500-[iconImageView]-2-[messageLabel]-2-[seperateView(0.5)]-2-[actionButton]-0-[secondActionButton]-4-|",
                 options: NSLayoutFormatOptions(rawValue: 0),
                 metrics: nil,
                 views: ["iconImageView": iconImageView, "messageLabel": messageLabel, "seperateView": seperateView, "actionButton": actionButton, "secondActionButton": secondActionButton])
 
-        leftPaddingConstraint = NSLayoutConstraint.init(item: iconImageView, attribute: .left, relatedBy: .equal, toItem: self, attribute: .left, multiplier: 1, constant: leftPadding)
+        leftPaddingConstraint = NSLayoutConstraint.init(item: iconImageView, attribute: .Left, relatedBy: .Equal, toItem: self, attribute: .Left, multiplier: 1, constant: leftPadding)
         
-        let vConstraintsForIconImageView: [NSLayoutConstraint] = NSLayoutConstraint.constraints(
-        withVisualFormat: "V:|-2-[iconImageView]-2-|",
+        let vConstraintsForIconImageView: [NSLayoutConstraint] = NSLayoutConstraint.constraintsWithVisualFormat(
+        "V:|-2-[iconImageView]-2-|",
                 options: NSLayoutFormatOptions(rawValue: 0),
                 metrics: nil,
                 views: ["iconImageView": iconImageView])
 
-        let vConstraintsForMessageLabel: [NSLayoutConstraint] = NSLayoutConstraint.constraints(
-        withVisualFormat: "V:|-0-[messageLabel]-0-|",
+        let vConstraintsForMessageLabel: [NSLayoutConstraint] = NSLayoutConstraint.constraintsWithVisualFormat(
+        "V:|-0-[messageLabel]-0-|",
                 options: NSLayoutFormatOptions(rawValue: 0),
                 metrics: nil,
                 views: ["messageLabel": messageLabel])
 
-        let vConstraintsForSeperateView: [NSLayoutConstraint] = NSLayoutConstraint.constraints(
-        withVisualFormat: "V:|-4-[seperateView]-4-|",
+        let vConstraintsForSeperateView: [NSLayoutConstraint] = NSLayoutConstraint.constraintsWithVisualFormat(
+        "V:|-4-[seperateView]-4-|",
                 options: NSLayoutFormatOptions(rawValue: 0),
                 metrics: nil,
                 views: ["seperateView": seperateView])
 
-        let vConstraintsForActionButton: [NSLayoutConstraint] = NSLayoutConstraint.constraints(
-        withVisualFormat: "V:|-0-[actionButton]-0-|",
+        let vConstraintsForActionButton: [NSLayoutConstraint] = NSLayoutConstraint.constraintsWithVisualFormat(
+        "V:|-0-[actionButton]-0-|",
                 options: NSLayoutFormatOptions(rawValue: 0),
                 metrics: nil,
                 views: ["actionButton": actionButton])
 
-        let vConstraintsForSecondActionButton: [NSLayoutConstraint] = NSLayoutConstraint.constraints(
-        withVisualFormat: "V:|-0-[secondActionButton]-0-|",
+        let vConstraintsForSecondActionButton: [NSLayoutConstraint] = NSLayoutConstraint.constraintsWithVisualFormat(
+        "V:|-0-[secondActionButton]-0-|",
                 options: NSLayoutFormatOptions(rawValue: 0),
                 metrics: nil,
                 views: ["secondActionButton": secondActionButton])
 
         iconImageViewWidthConstraint = NSLayoutConstraint.init(
-        item: iconImageView, attribute: .width, relatedBy: .equal,
-                toItem: nil, attribute: .notAnAttribute, multiplier: 1, constant: TTGSnackbar.snackbarIconImageViewWidth)
+        item: iconImageView, attribute: .Width, relatedBy: .Equal,
+                toItem: nil, attribute: .NotAnAttribute, multiplier: 1, constant: TTGSnackbar.snackbarIconImageViewWidth)
 
         actionButtonWidthConstraint = NSLayoutConstraint.init(
-        item: actionButton, attribute: .width, relatedBy: .equal,
-                toItem: nil, attribute: .notAnAttribute, multiplier: 1, constant: TTGSnackbar.snackbarActionButtonMinWidth)
+        item: actionButton, attribute: .Width, relatedBy: .Equal,
+                toItem: nil, attribute: .NotAnAttribute, multiplier: 1, constant: TTGSnackbar.snackbarActionButtonMinWidth)
 
         secondActionButtonWidthConstraint = NSLayoutConstraint.init(
-        item: secondActionButton, attribute: .width, relatedBy: .equal,
-                toItem: nil, attribute: .notAnAttribute, multiplier: 1, constant: TTGSnackbar.snackbarActionButtonMinWidth)
-
-        let vConstraintsForActivityIndicatorView: [NSLayoutConstraint] = NSLayoutConstraint.constraints(
-        withVisualFormat: "V:|-2-[activityIndicatorView]-2-|",
+        item: secondActionButton, attribute: .Width, relatedBy: .Equal,
+                toItem: nil, attribute: .NotAnAttribute, multiplier: 1, constant: TTGSnackbar.snackbarActionButtonMinWidth)
+
+        let vConstraintsForActivityIndicatorView: [NSLayoutConstraint] = NSLayoutConstraint.constraintsWithVisualFormat(
+        "V:|-2-[activityIndicatorView]-2-|",
                 options: NSLayoutFormatOptions(rawValue: 0),
                 metrics: nil,
                 views: ["activityIndicatorView": activityIndicatorView])
 
-        let hConstraintsForActivityIndicatorView: [NSLayoutConstraint] = NSLayoutConstraint.constraints(
-        withVisualFormat: "H:[activityIndicatorView(activityIndicatorWidth)]-2-|",
+        let hConstraintsForActivityIndicatorView: [NSLayoutConstraint] = NSLayoutConstraint.constraintsWithVisualFormat(
+        "H:[activityIndicatorView(activityIndicatorWidth)]-2-|",
                 options: NSLayoutFormatOptions(rawValue: 0),
                 metrics: ["activityIndicatorWidth": height - 4],
                 views: ["activityIndicatorView": activityIndicatorView])

     
     - returns: TTGSnackbar instance
     */
    public init(message: String, duration: TTGSnackbarDuration, actionText: String, messageFont: UIFont, actionTextFont: UIFont, actionBlock: @escaping TTGActionBlock) {
        super.init(frame: TTGSnackbar.snackbarDefaultFrame)
        self.duration = duration
        self.message = message

    }

    /// Message text color. Default is white.
    public dynamic var messageTextColor: UIColor = UIColor.whiteColor() {
        didSet {
            messageLabel.textColor = messageTextColor
        }
    }

    /// Message text font. Default is Bold system font (14).
    public dynamic var messageTextFont: UIFont = UIFont.boldSystemFontOfSize(14) {
        didSet {
            messageLabel.font = messageTextFont
        }
    }

    /// Message text alignment. Default is left
    public dynamic var messageTextAlign: NSTextAlignment = .Left {
        didSet {
            messageLabel.textAlignment = messageTextAlign
        }
