         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
         {

        footerLabel = UILabel()
        footerLabel?.text = text
        footerLabel?.textColor = footerColor
        footerLabel?.textAlignment = .Center
    }
    
    // MARK: -Get Frame
    
    private func getBackGroundFrame(view : UIView) -> CGRect
    {
        let sideMargin:CGFloat = 20.0
        var side = progressIndicator!.frame.height + sideMargin
        if titleLabel?.text != nil && !isCleanedStringEmpty(titleLabel?.text)
        {
            side = progressIndicator!.frame.height + titleLabel!.frame.width
        }
        else if (footerLabel?.text != nil && !isCleanedStringEmpty(footerLabel?.text))
        {
            side = progressIndicator!.frame.height + footerLabel!.frame.width
        }
        var originX = view.center.x - (side/2)
        var originY = view.center.y - (side/2)
        return CGRectMake(originX, originY, side, side)
    }
    
    // MARK: Get Size
    
    private func getLabelSize() -> CGSize
    {
        var width = progressIndicator!.frame.width * 3
        var height = progressIndicator!.frame.height / 1.5
        return CGSizeMake(width, height)
    }
    
    // MARK: -Get Origin
    
    private func getIndicatorOrigin(view : UIView, activityIndicatorView indicator : UIActivityIndicatorView) -> CGPoint
    {
        var side = indicator.frame.size.height
        var originX = (view.bounds.width/2) - (side/2)
        var originY = (view.bounds.height/2) - (side/2)
        return CGPointMake(originX, originY)
    }
    
    private func getHeaderOrigin(view : UIView) -> CGPoint
    {
        var width = titleLabel!.frame.size.width
        var originX = (view.bounds.width/2) - (width/2)
        return CGPointMake(originX, 1)
    }
    
    private func getFooterOrigin(view : UIView) -> CGPoint
    {
        var width = footerLabel!.frame.width
        var height = footerLabel!.frame.height
        var originX = (view.bounds.width/2) - (width/2)
        var originY = view.frame.height - (height + 1)
        return CGPointMake(originX, originY)
    }
    
    private func isCleanedStringEmpty(string: String) -> Bool
    {
        let cleanString = string.stringByTrimmingCharactersInSet(whiteSpaceAndNewlineCharacterSet)
        return cleanString.isEmpty
    }
    
    // MARK: -Set Font
    func boldFontWithFont(font : UIFont?) -> UIFont
    {
        var fontDescriptor : UIFontDescriptor = font!.fontDescriptor().fontDescriptorWithSymbolicTraits(.TraitBold)!
        return UIFont(descriptor: fontDescriptor, size: 0)
    }
    
    /*
    // Only override drawRect: if you perform custom drawing.
    // An empty implementation adversely affects performance during animation.
    override func drawRect(rect: CGRect)
    {
        // Drawing code
    }
    */

}

        titleLabel?.text = text
        titleLabel?.font = self.boldFontWithFont(titleLabel?.font)
        titleLabel?.textColor = headerColor
        titleLabel?.textAlignment = .center
    }
    
    fileprivate func setFooterLabel(_ text : String)
    {
        if footerLabel?.superview != nil
        {
