 
 private final class ARSInfiniteLoader: ARSLoader {
     
+	@objc var emptyView = UIView()
     @objc var backgroundView: UIVisualEffectView
     @objc var outerCircle = CAShapeLayer()
     @objc var middleCircle = CAShapeLayer()


private func ars_presentLoader(loader: ARSLoader, onView view: UIView?, completionBlock: (() -> Void)?) {
    ars_currentLoader = loader
    let backgroundView = loader.backgroundView
    
    ars_dispatchOnMainQueue {
        if let targetView = view {
            targetView.addSubview(backgroundView)
        } else {
            ars_window()!.addSubview(backgroundView)
        }
        
        backgroundView.alpha = 0.1
        UIView.animateWithDuration(ars_config.backgroundViewPresentAnimationDuration, delay: 0.0, options: .CurveEaseOut, animations: {
            backgroundView.alpha = 1.0
        }, completion: { _ in completionBlock?() })
    }
}

private func ars_hideLoader(loader: ARSLoader?, withCompletionBlock block: (() -> Void)?) {
    guard let loader = loader else { return }
    
    ars_dispatchOnMainQueue {
        UIView.animateWithDuration(ars_config.backgroundViewDismissAnimationDuration, delay: 0.0, options: .CurveEaseOut, animations: {
            loader.emptyView.alpha = 0.0
            loader.backgroundView.transform = CGAffineTransformMakeScale(0.9, 0.9)
        }, completion: { _ in block?() })
    }
    
