     static let kMarginTop:CGFloat = 10
     static let kMarginHorizontal:CGFloat = 10
     static let kHeight:CGFloat = 60
+    weak var layoutTop:NSLayoutConstraint!
+    private let kAnimationDuration:TimeInterval = 0.4
     
     class func message(message:String)
     {

                options:[],
                metrics:metrics,
                views:views))
        }
    }
    

        clipsToBounds = true
        backgroundColor = UIColor.complement
        translatesAutoresizingMaskIntoConstraints = false
    }
    
    //MARK: public
    
    func animate(open:Bool)
    {
        if open
        {
            layoutTop.constant = VAlert.kMarginTop
        }
        else
        {
            layoutTop.constant = -VAlert.kHeight
        }
        
        UIView.animate(withDuration:kAnimationDuration)
        { [weak self] in
            
            self?.layoutIfNeeded()
        }
    }
}
