         shapeLayer.fillColor = nil
         shapeLayer.strokeColor = UIColor(white: 1.0, alpha: 0.8).CGColor
         shapeLayer.lineWidth = 5.0
-        self.backgroundView.layer.addSublayer(shapeLayer)
+        backgroundView?.layer.addSublayer(shapeLayer)
         
         let strokeEnd = CABasicAnimation(keyPath: "strokeEnd")
         strokeEnd.fromValue = 0.0

        keyWindow?.endEditing(true)
        keyWindow?.userInteractionEnabled = false
        
        let view = RappleActivityIndicatorView.sharedInstance
        
        NSNotificationCenter.defaultCenter().addObserver(view, selector: "deviceOrientationDidChange:", name: UIDeviceOrientationDidChangeNotification, object: nil)
        
        view.createProgress()
        
        UIView.animateWithDuration(0.8) { () -> Void in
            view.backgroundView.alpha = 1.0
        }
    }
    
    /**

    }
    
    /**
     Start Rapple progress indicator with text message
     @param attribute progress UI attributes
     */
    public class func startAnimatingWithLabel(label : String, attributes:[String:AnyObject]) {
        RappleActivityIndicatorView.sharedInstance.attributes = attributes
        RappleActivityIndicatorView.sharedInstance.text = label
        RappleActivityIndicatorView.startAnimating()
    }
    
    /**
     Start Rapple progress indicator
     */
    public class func stopAnimating() {
        let keyWindow = UIApplication.sharedApplication().keyWindow
        keyWindow?.userInteractionEnabled = true
        
        let progress = RappleActivityIndicatorView.sharedInstance
        
        UIView.animateWithDuration(0.5, animations: { () -> Void in
            progress.backgroundView?.alpha = 0.0
            keyWindow?.tintAdjustmentMode = .Automatic
            keyWindow?.tintColorDidChange()
            }) { (finished) -> Void in
                
                if let views = progress.backgroundView?.subviews {
                    for v in views {
                        v.removeFromSuperview()
                    }
                }
                
                progress.backgroundView?.removeFromSuperview()
                
                progress.backgroundView = nil
        }
        
        
        NSNotificationCenter.defaultCenter().removeObserver(progress)
    }
    
    func deviceOrientationDidChange(notif:NSNotification) {
        let progress = RappleActivityIndicatorView.sharedInstance
        if let views = progress.backgroundView?.subviews {
            for v in views {
                v.removeFromSuperview()
            }
        }
        progress.backgroundView?.removeFromSuperview()
        progress.backgroundView = nil
        
        progress.createProgress()
        progress.createProgressIndicator()
    }
    
    private func createProgress() {
