         
         outerCircleView.frame.size = frameSize
         
-        outerCircle.path = UIBezierPath(ovalInRect: CGRect(x: 0.0, y: 0.0, width: frameSize.width, height: frameSize.height)).CGPath
+        outerCircle.path = UIBezierPath(ovalIn: CGRect(x: 0.0, y: 0.0, width: frameSize.width, height: frameSize.height)).cgPath
         outerCircle.lineWidth = 8.0
         outerCircle.strokeStart = 0.0
         outerCircle.strokeEnd = 0.45
         outerCircle.lineCap = kCALineCapRound
-        outerCircle.fillColor = UIColor.clearColor().CGColor
-        outerCircle.strokeColor = UIColor.whiteColor().CGColor
+        outerCircle.fillColor = UIColor.clear().cgColor
+        outerCircle.strokeColor = UIColor.white().cgColor
         outerCircleView.layer.addSublayer(outerCircle)
         
         outerCircle.strokeStart = 0.0

    // The spinner title
    //
    public var title: String = "" {
        didSet(newTitle) {
            // Do not show spring animation if title hasn't changed.
            if newTitle != title {
                let spinner = SwiftSpinner.sharedInstance
                
                UIView.animateWithDuration(0.15, delay: 0.0, options: .CurveEaseOut, animations: {
                    spinner.titleLabel.transform = CGAffineTransformMakeScale(0.75, 0.75)
                    spinner.titleLabel.alpha = 0.2
                    }, completion: {_ in
                        spinner.titleLabel.text = self.title
                        UIView.animateWithDuration(0.35, delay: 0.0, usingSpringWithDamping: 0.35, initialSpringVelocity: 0.0, options: [], animations: {
                            spinner.titleLabel.transform = CGAffineTransformIdentity
                            spinner.titleLabel.alpha = 1.0
                            }, completion: nil)
                })
            }
        }
    }
    

        }
        
        //inner circle
        UIView.animate(withDuration: 0.5, delay: 0.0, usingSpringWithDamping: 0.5, initialSpringVelocity: 0.0, options: [], animations: {
            self.currentInnerRotation += CGFloat(M_PI_4)
            self.innerCircleView.transform = CGAffineTransform(rotationAngle: self.currentInnerRotation)
            }, completion: {_ in
                self.delay(seconds: 0.5, completion: {
                    if self.animating {
