                 })
         })
     }
-
-    @objc public func updateFrame() {
+    
+    @objc func orientationChangedAction() {
+        if let _ = SwiftSpinner.containerView() {
+            SwiftSpinner.shared.setNeedsLayout()
+        }
+    }
+    
+    public func updateFrame() {
         if let containerView = SwiftSpinner.containerView() {
             SwiftSpinner.shared.frame = containerView.bounds
             containerView.bringSubviewToFront(SwiftSpinner.shared)

        #if EXTENSION
            return customSuperview
        #else
            return customSuperview ?? UIApplication.shared.keyWindow
        #endif
    }


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