4 Replies
      Latest reply on Nov 15, 2017 10:33 AM by petere
      petere Level 1 Level 1 (0 points)

        When running a bare-bones test project in Xcode 9 Beta 1 (consisting of basically nothing but a nav controller and a view controller) I have found different behavior related to prefersStatusBarHidden depending on whether or not I am running on the iPhone X simulator or not.


        Specifically, when I launch with a UINavigationController as the root view controller and a single UIViewController on the stack, the view controller's prefersStatusBarHidden computed property is called (as expected) for pretty much every simulator just before the view controller appears. But it is *not* called when running the exact same code in the iPhone X simulator (and in fact the status bar is *not* hidden on that simulator).


        To get the same behavior on the iPhone X simulator, I am forced to subclass UINavigationController and override childViewControllerForStatusBarHidden (returning viewController).


        Is this supposed to happen?


        (Note also that this behavior differs from Xcode 9 and iOS 11 GM -- prefersStatusBarHidden is checked on all simulators.