                 endAngle = (1.8 * CGFloat(M_PI)) + startAngle
             }
             
-            processBackgroundPath.addArcWithCenter(center, radius: radius, startAngle: startAngle, endAngle: endAngle, clockwise: true)
-            self.backgroundLayer?.path = processBackgroundPath.CGPath;
+            processBackgroundPath.addArc(withCenter: center, radius: radius, startAngle: startAngle, endAngle: endAngle, clockwise: true)
+            self.backgroundLayer?.path = processBackgroundPath.cgPath;
         }
         
         /**
          Start and stop spinning
          */
         
-        private func start() {
+        func start() {
             self.isSpinning? = true
-            self.drawBackgroundCircle(true)
+            self.drawBackgroundCircle(partial: true)
             
             let rotationAnimation : CABasicAnimation = CABasicAnimation(keyPath: "transform.rotation.z")
-            rotationAnimation.toValue = NSNumber(double: M_PI * 2.0)
-            rotationAnimation.duration = CFTimeInterval(speed!);
-            rotationAnimation.cumulative = true;
+            rotationAnimation.toValue = NSNumber(value: M_PI * 2.0)
+            rotationAnimation.duration = 1;
+            rotationAnimation.isCumulative = true;
             rotationAnimation.repeatCount = HUGE;
-            self.backgroundLayer?.addAnimation(rotationAnimation, forKey: "rotationAnimation")
-        }
-        
-        private func stop() {
-            self.drawBackgroundCircle(false)
+            self.backgroundLayer?.add(rotationAnimation, forKey: "rotationAnimation")
+        }
+        
+        func stop() {
+            self.drawBackgroundCircle(partial: false)
             
             self.backgroundLayer?.removeAllAnimations()
             self.isSpinning? = false

        }
        
        if (self.titleLabel == nil) {
            self.titleLabel = UILabel(frame: CGRectMake(loaderTitleMargin, loaderSpinnerMarginTop + loadingViewSize, self.frame.width - loaderTitleMargin*2, 42.0))
            self.addSubview(self.titleLabel!)
            self.titleLabel?.numberOfLines = 1
            self.titleLabel?.textAlignment = NSTextAlignment.Center
            self.titleLabel?.adjustsFontSizeToFitWidth = true
        } else {
            self.titleLabel?.frame = CGRectMake(loaderTitleMargin, loaderSpinnerMarginTop + loadingViewSize, self.frame.width - loaderTitleMargin*2, 42.0)
        }
        
        self.titleLabel?.font = self.config.titleTextFont
        self.titleLabel?.textColor = self.config.titleTextColor
        self.titleLabel?.text = self.title
        
        self.titleLabel?.hidden = self.title == nil
    }
    
    func frameForSpinner() -> CGRect {

    
    public class func show(title title: String?, animated : Bool) {
        
        let currentWindow : UIWindow = UIApplication.shared.keyWindow!
        
        let loader = SwiftLoader.sharedInstance
        loader.canUpdated = true
