     }
 
     private var _observingInsets = false
+    private var _shouldObserveInsets: Bool {
+        guard let viewControllerClass = viewControllerClass else {
+            return false
+        }
+        return !(viewControllerClass is UITabBarController.Type) &&
+            !(viewControllerClass is UINavigationController.Type)
+    }
     private func _stopObservingInsets() {
         if #available(iOS 11.0, *), _observingInsets {
             removeObserver(self, forKeyPath: "_view.safeAreaInsets")

                    root.update()
                }
            }
            return
        }
        if change[.newKey] as? UIEdgeInsets != nil {
            if _view?.window != nil {
                // If not yet mounted, safe area insets can't be valid
                update()
            }
            return
        }
    }


        change: [NSKeyValueChangeKey: Any]?,
        context _: UnsafeMutableRawPointer?
    ) {
        guard _setupComplete, !_suppressUpdates, let new = change?[.newKey] else {
            return
        }
        switch new {
        case let rect as CGRect:
            if !rect.size.isNearlyEqual(to: frame.size) {
                var root = self
                while let parent = root.parent {
                    root = parent
