Stage manager safe area and hidden status bar: How to avoid overlapping by stage manager controls?

Stage manager controls are overlapping top area of an app if the status bar is hidden despite constraints are relative to the safe area. It is surprise for me that the stage manager is not included in the safe area and designed that the status bar will be responsible for making enough margin to avoid overlapping.

Is there anything I am missing on how to treat such problem except avoiding controls in the top area at all and enabling the status bar in the app (users got used to it and we don't see it is possible to explain such changes to all of them)? I see that safe are is disrespected, and I do not find any helpful api or settings in interface builder.

The only patch I have right now is to auto hide home indicator

    override func viewDidLoad() {
        super.viewDidLoad()
        setNeedsStatusBarAppearanceUpdate()
    }

    override var prefersHomeIndicatorAutoHidden: Bool {
        return true
    }

The stage manager controls are hidden with home indicator until first user interaction. This might help just a little to have at least possibility click something in the top center once in a while. But overall experience is bad.

Steps:

  • Create a new project for iOS in Xcode using storyboard as interface.
  • Add a button or any other view/control to the main view controller view in interface builder.
  • Add the constraints to connect the button with its parent viewcontroller’s view: the top constraint should be related to top safe area with 0 space; centerX of the button aligned with parent’s centerX.
  • In main view controller override prefersStatusBarHidden to return true.
    override var prefersStatusBarHidden: Bool {
        get {
            return true
        }
  • Launch the app and try to click created button.

Expected:

  • Created button is clickable and placed slightly below the stage manger’s controls.
  • Safe area does respect the stage manager controls even if the status bar is hidden the same way it behaves in case of avoiding iPhone notches.
  • Or at least there is any API to check if the stage manager is enabled.

Actual:

  • Created button is overlapped by the stage manager’s controls and not clickable.
Post not yet marked as solved Up vote post of Arslan Ataev Down vote post of Arslan Ataev
774 views