     fileprivate lazy var contentView: UIView = {
        
         let contentView = UIView()
-        
+        contentView.alpha = 0
+//        contentView.transform = CGAffineTransform(scaleX: 0, y: 0)
         contentView.layer.cornerRadius = 10
         
         return contentView

        
        super.init(frame: frame)
        
        autoresizingMask = [.flexibleWidth, .flexibleHeight]
        
        addSubview(contentView)

        contentView.addSubview(label)
        contentView.addSubview(progressLabel)
        contentView.layer.addSublayer(progressLayer)

    
    }
    
    fileprivate func setupData() {
        
        reset()
    }
    
    fileprivate func setupNotification() {
        NotificationCenter.default.addObserver(self, selector: #selector(HUD.keyboardWillChangeFrameNotification), name: NSNotification.Name.UIKeyboardWillChangeFrame, object: nil)
        
    }
    
}

extension HUD{
    
    var visableKeyboardFrame: CGRect? {
        
        var tmp: UIWindow? = nil
        
        for window in UIApplication.shared.windows {
            
            if !window.isMember(of: UIWindow.self) {
                
                tmp = window
                break
            }
            
        }
        
        guard let keyboardWindow = tmp  else {
            return nil
        }
        
        for possibleKeyboard in keyboardWindow.subviews {
            
            if possibleKeyboard.isKind(of: NSClassFromString("UIPeripheralHostView")!) || possibleKeyboard.isKind(of: NSClassFromString("UIKeyboard")!){
                
                return possibleKeyboard.frame
            }else if possibleKeyboard.isKind(of: NSClassFromString("UIInputSetContainerView")!) {
                
                for possibleKeyboardSubview in possibleKeyboard.subviews {
                    
                    if possibleKeyboardSubview.isKind(of: NSClassFromString("UIInputSetHostView")!) {
                        return possibleKeyboardSubview.frame
                    }
                    
                }
                
            }
            
        }
        
        return nil
        
    }
    
    func keyboardWillChangeFrameNotification() {
        
        setNeedsLayout()
    }
}




fileprivate extension UIImage {
