Search code examples
iosswiftios13uistatusbar

iOS 13 new presentation style turns status bar to light content


I don't have any specific settings regarding the status bar style in my app. However, ever since I started building my app using iOS 13 SDK, the new "card style" presentation modal changes status bar to light content even when the background is not dark, in the end, I have almost unvisible content in the status bar.


For instance, here is the status bar of a view controller that presents another view using present(_:animated:completion:):

Parent UIViewController


However, after presenting another view controller, the status bar turns to light content like this:

Child UIViewController


Is there a way to avoid that without tuning status bar parameters here and there?


Solution

  • Taking a look at the Human Interface Guidelines as they relate to Modality, they provide the following image that aligns with your second screenshot:

    enter image description here

    The following comment comes across as Apple's instructions for how to handle this scenario, emphasis is mine:

    The sheet presentation style appears as a card that partially covers the underlying content and dims all uncovered areas to prevent interaction with them.

    As pointed out in your comment, the solution in your case is to assign a different background color such that it contrasts properly. Just one note is to ensure that your color choice works with both light and dark mode.