                 // Orientation change observer
                 NotificationCenter.default.addObserver(
                     spinner,
-                    selector: #selector(SwiftSpinner.updateFrame),
-                    name: UIApplication.didChangeStatusBarOrientationNotification,
+                    selector: #selector(SwiftSpinner.orientationChangedAction),
+                    name: UIDevice.orientationDidChangeNotification,
                     object: nil)
             #endif
         } else if spinner.dismissing {

                })
        })
    }

    @objc public func updateFrame() {
        if let containerView = SwiftSpinner.containerView() {
            SwiftSpinner.shared.frame = containerView.bounds
            containerView.bringSubviewToFront(SwiftSpinner.shared)

        #if EXTENSION
            return customSuperview
        #else
            if #available(iOS 13, *) {
                return customSuperview ?? UIApplication.shared.windows.first{ $0.isKeyWindow }
            } else {
                return customSuperview ?? UIApplication.shared.keyWindow
            }
        #endif
    }

