         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
     {

        self.frame = view.frame
        setIndicator()
        
        if title != nil && title != ""
        {
            setTitleLabel(title!)
            titleLabel!.frame = CGRectMake(0, 0, getLabelSize().width, getLabelSize().height)
        }
        if footer != nil && footer != ""
        {
            setFooterLabel(footer!)
            footerLabel!.frame = CGRectMake(0, 0, getLabelSize().width, getLabelSize().height)
        }
        setBackGround(self)
        if title != nil && title != ""
        {
            titleLabel!.frame.origin = getHeaderOrigin(backGroundView!)
            titleLabel?.adjustsFontSizeToFitWidth = true
            backGroundView?.addSubview(titleLabel!)
        }
        if footer != nil && footer != ""
        {
            footerLabel!.frame.origin = getFooterOrigin(backGroundView!)
            footerLabel?.adjustsFontSizeToFitWidth = true

    {
        let sideMargin:CGFloat = 20.0
        var side = progressIndicator!.frame.height + sideMargin
        if titleLabel?.text != nil && !self.isCleanedStringEmpty(titleLabel?.text)
        {
            side = progressIndicator!.frame.height + titleLabel!.frame.width
        }
        else if (footerLabel?.text != nil && !self.isCleanedStringEmpty(footerLabel?.text))
        {
            side = progressIndicator!.frame.height + footerLabel!.frame.width
        }
