     public dynamic var animationType: TTGSnackbarAnimationType = TTGSnackbarAnimationType.SlideFromBottomBackToBottom
 
     /// Show and hide animation duration. Default is 0.3
-    public dynamic var animationDuration: NSTimeInterval = 0.3
+    public dynamic var animationDuration: TimeInterval = 0.3
 
     /// Corner radius: [0, height / 2]. Default is 4
     public dynamic var cornerRadius: CGFloat = 4 {

    // MARK: Class property.

    /// Snackbar default frame
    private static let snackbarDefaultFrame: CGRect = CGRectMake(0, 0, 320, 44)

    /// Snackbar action button max width.
    private static let snackbarActionButtonMaxWidth: CGFloat = 64

    /// Snackbar action button min width.
    private static let snackbarActionButtonMinWidth: CGFloat = 44

    /// Snackbar icon imageView default width
    private static let snackbarIconImageViewWidth: CGFloat = 32

    // MARK: -
    // MARK: Typealias

    /// Action callback closure definition.
    public typealias TTGActionBlock = (snackbar:TTGSnackbar) -> Void

    /// Dismiss callback closure definition.
    public typealias TTGDismissBlock = (snackbar:TTGSnackbar) -> Void

    // MARK: -
    // MARK: Public property.


        iconImageView = UIImageView()
        iconImageView.translatesAutoresizingMaskIntoConstraints = false
        iconImageView.backgroundColor = UIColor.clear
        iconImageView.contentMode = iconContentMode
        self.addSubview(iconImageView)

        messageLabel = UILabel()
        messageLabel.translatesAutoresizingMaskIntoConstraints = false
        messageLabel.textColor = UIColor.white
        messageLabel.font = messageTextFont
        messageLabel.backgroundColor = UIColor.clear
        messageLabel.lineBreakMode = .byWordWrapping
        messageLabel.numberOfLines = 2
        messageLabel.textAlignment = .left
        messageLabel.text = message
        self.addSubview(messageLabel)

        actionButton = UIButton()
        actionButton.translatesAutoresizingMaskIntoConstraints = false
        actionButton.backgroundColor = UIColor.clear
        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)
        self.addSubview(actionButton)

        secondActionButton = UIButton()
        secondActionButton.translatesAutoresizingMaskIntoConstraints = false
        secondActionButton.backgroundColor = UIColor.clear
        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)
        self.addSubview(secondActionButton)

        seperateView = UIView()
        seperateView.translatesAutoresizingMaskIntoConstraints = false
        seperateView.backgroundColor = UIColor.gray
        self.addSubview(seperateView)

        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-|",
                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)
        
        let vConstraintsForIconImageView: [NSLayoutConstraint] = NSLayoutConstraint.constraints(
        withVisualFormat: "V:|-2-[iconImageView]-2-|",
                options: NSLayoutFormatOptions(rawValue: 0),
                metrics: nil,
                views: ["iconImageView": iconImageView])

        let vConstraintsForMessageLabel: [NSLayoutConstraint] = NSLayoutConstraint.constraints(
        withVisualFormat: "V:|-0-[messageLabel]-0-|",
                options: NSLayoutFormatOptions(rawValue: 0),
                metrics: nil,
                views: ["messageLabel": messageLabel])

        let vConstraintsForSeperateView: [NSLayoutConstraint] = NSLayoutConstraint.constraints(
        withVisualFormat: "V:|-4-[seperateView]-4-|",
                options: NSLayoutFormatOptions(rawValue: 0),
                metrics: nil,
                views: ["seperateView": seperateView])

        let vConstraintsForActionButton: [NSLayoutConstraint] = NSLayoutConstraint.constraints(
        withVisualFormat: "V:|-0-[actionButton]-0-|",
                options: NSLayoutFormatOptions(rawValue: 0),
                metrics: nil,
                views: ["actionButton": actionButton])

        let vConstraintsForSecondActionButton: [NSLayoutConstraint] = NSLayoutConstraint.constraints(
        withVisualFormat: "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)

        actionButtonWidthConstraint = NSLayoutConstraint.init(
        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-|",
                options: NSLayoutFormatOptions(rawValue: 0),
                metrics: nil,
                views: ["activityIndicatorView": activityIndicatorView])

        let hConstraintsForActivityIndicatorView: [NSLayoutConstraint] = NSLayoutConstraint.constraints(
        withVisualFormat: "H:[activityIndicatorView(activityIndicatorWidth)]-2-|",
                options: NSLayoutFormatOptions(rawValue: 0),
                metrics: ["activityIndicatorWidth": height - 4],
                views: ["activityIndicatorView": activityIndicatorView])
