     {
         if open
         {
-            layoutTop.constant = VAlert.kMarginTop
+            layoutTop.constant = kMarginTop
         }
         else
         {

            animations:
        { [weak self] in
            
            self?.layoutIfNeeded()
            
        })
        { [weak self] (done) in
        
            if open
            {
                guard
                    
                    let timeOut:TimeInterval = self?.kTimeOut
                
                else
                {
                    return
                }
                
                Timer.scheduledTimer(
                    timeInterval:timeOut,
                    target:self,
                    selector:#selector(self?.timeOut(sender:)),
                    userInfo:nil,
                    repeats:false)
            }
        }
        
        UIView.animate(withDuration:kAnimationDuration)
        { [weak self] in
            
            self?.layoutIfNeeded()
        }
    }
}


class VAlert:UIView
{
    static let kMarginHorizontal:CGFloat = 10
    static let kHeight:CGFloat = 65
    weak var layoutTop:NSLayoutConstraint!
    private let kMarginTop:CGFloat = 20
    private let kAnimationDuration:TimeInterval = 0.4
    private let kTimeOut:TimeInterval = 3
    private let kFontSize:CGFloat = 16
    private let kLabelMargin:CGFloat = 10
    private let kCornerRadius:CGFloat = 5
    private let kBorderWidth:CGFloat = 1
