     private static let timerRunLoop = NSRunLoop.currentRunLoop()
     private static let timerPort = NSPort()
     
+    deinit {
+        NSNotificationCenter.defaultCenter().removeObserver(self, name: UIApplicationWillEnterForegroundNotification, object: nil)
+    }
+    
     public override class func initialize() {
         super.initialize()
         

                indicator.stopAnimation(false, completion: completion)
            }
        } else {
            rotateTimer = nil
            strokeTimer = nil
            stopAnimationsHandler = nil
            indicatorView.layer.removeAllAnimations()

    private func lotateAnimation(duration: CFTimeInterval) -> CAPropertyAnimation {
        let anim = CABasicAnimation(keyPath: "transform.rotation.z")
        anim.duration = duration
        anim.repeatCount = HUGE
        anim.fromValue = -(M_PI + M_PI_4)
        anim.toValue = M_PI - M_PI_4
        
