         self.addSubview(backGroundView!)
     }
     
-    private func setIndicator()
+    fileprivate func setIndicator()
     {
         if progressIndicator?.superview != nil
         {
             progressIndicator?.removeFromSuperview()
         }
-        progressIndicator = UIActivityIndicatorView(activityIndicatorStyle: .WhiteLarge)
-        progressIndicator?.activityIndicatorViewStyle = UIActivityIndicatorViewStyle.WhiteLarge
+        progressIndicator = UIActivityIndicatorView(activityIndicatorStyle: .whiteLarge)
+        progressIndicator?.activityIndicatorViewStyle = UIActivityIndicatorViewStyle.whiteLarge
         progressIndicator?.color = loaderColor
-        progressIndicator?.backgroundColor = UIColor.clearColor()
+        progressIndicator?.backgroundColor = UIColor.clear
         progressIndicator?.startAnimating()
     }
     
-    private func setTitleLabel(text : String)
+    fileprivate func setTitleLabel(_ text : String)
     {
         if titleLabel?.superview != nil
         {

    }
    
    // Show the loader added to the mentioned window with the provided title and footer texts
    func showInWindow(window : UIWindow, withHeader title : String?, andFooter footer : String?)
    {
        self.showInView(window, withHeader: title, andFooter: footer)
    }
    
    // Show the loader added to the mentioned view with no title and footer texts
    func showInView(view : UIView)
    {
        self.showInView(view, withHeader: nil, andFooter: nil)
    }
    
    // Show the loader added to the mentioned window with no title and footer texts
    func showInWindow(window : UIWindow)
    {
        self.showInView(window, withHeader: nil, andFooter: nil)
    }

class JHProgressHUD: UIView
{
    
    fileprivate var backGroundView : UIView?
    fileprivate var progressIndicator : UIActivityIndicatorView?
    fileprivate var titleLabel : UILabel?
    fileprivate var footerLabel : UILabel?
    
    var headerColor : UIColor
    var footerColor : UIColor
    var backGroundColor : UIColor
    var loaderColor : UIColor
    
    static let sharedHUD = JHProgressHUD()
    
    init()
    {
        //Initialising Code
        headerColor = UIColor.white
        footerColor = UIColor.white
        backGroundColor = UIColor.black
        loaderColor = UIColor.white
        super.init(frame: CGRect.zero)
    }
    
    required init(coder aDecoder: NSCoder)
    {
        headerColor = UIColor.white
        footerColor = UIColor.white
        backGroundColor = UIColor.black
        loaderColor = UIColor.white
        super.init(coder: aDecoder)!
    }
    
    override init(frame: CGRect)
    {
        headerColor = UIColor.white
        footerColor = UIColor.white
        backGroundColor = UIColor.black
        loaderColor = UIColor.white
        super.init(frame: frame)
    }
    
    // MARK: -Public Methods
    
    // Show the loader added to the mentioned view with the provided title and footer texts
    func showInView(_ view : UIView, withHeader title : String?, andFooter footer : String?)
    {
        self.hide()
        self.frame = view.frame
        setIndicator()
        
        if title != nil && !isCleanedStringEmpty(title!)
        {
            setTitleLabel(title!)
            titleLabel!.frame = CGRect(x: 0, y: 0, width: getLabelSize().width, height: getLabelSize().height)
        }
        if footer != nil && !isCleanedStringEmpty(footer!)
        {
            setFooterLabel(footer!)
            footerLabel!.frame = CGRect(x: 0, y: 0, width: getLabelSize().width, height: getLabelSize().height)
        }
        setBackGround(self)
        if title != nil && !isCleanedStringEmpty(title!)
        {
            titleLabel!.frame.origin = getHeaderOrigin(backGroundView!)
            titleLabel?.adjustsFontSizeToFitWidth = true
            backGroundView?.addSubview(titleLabel!)
        }
        if footer != nil && !isCleanedStringEmpty(footer!)
        {
            footerLabel!.frame.origin = getFooterOrigin(backGroundView!)
            footerLabel?.adjustsFontSizeToFitWidth = true
