             }
             
             containerView.addSubview(spinner)
-
-            UIView.animateWithDuration(0.33, delay: 0.0, options: .CurveEaseOut, animations: {
+            
+            UIView.animate(withDuration: 0.33, delay: 0.0, options: .curveEaseOut, animations: {
                 spinner.alpha = 1.0
                 }, completion: nil)
             
             #if os(iOS)
-            // Orientation change observer
-            NSNotificationCenter.defaultCenter().addObserver(
-                spinner,
-                selector: #selector(SwiftSpinner.updateFrame),
-                name: UIApplicationDidChangeStatusBarOrientationNotification,
-                object: nil)
+                // Orientation change observer
+                NotificationCenter.default().addObserver(
+                    spinner,
+                    selector: #selector(SwiftSpinner.updateFrame),
+                    name: NSNotification.Name.UIApplicationDidChangeStatusBarOrientation,
+                    object: nil)
             #endif
         }
         

        blurView = UIVisualEffectView(effect: blurEffect)
        addSubview(blurView)
        
        vibrancyView = UIVisualEffectView(effect: UIVibrancyEffect(forBlurEffect: blurEffect))
        addSubview(vibrancyView)
        
        let titleScale: CGFloat = 0.85
        titleLabel.frame.size = CGSize(width: frameSize.width * titleScale, height: frameSize.height * titleScale)
        titleLabel.font = defaultTitleFont
        titleLabel.numberOfLines = 0
        titleLabel.textAlignment = .Center
        titleLabel.lineBreakMode = .ByWordWrapping
        titleLabel.adjustsFontSizeToFitWidth = true
        
        vibrancyView.contentView.addSubview(titleLabel)

    
    // MARK: - Util methods
    
    func delay(seconds: Double, completion:()->()) {
        let popTime = DispatchTime.now() + Double(Int64( Double(NSEC_PER_SEC) * seconds )) / Double(NSEC_PER_SEC)
        
        DispatchQueue.main.after(when: popTime) {
            completion()
        }
    }
