0
votes

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?

1
FWIW I checked this just now using the mail client in iOS 13.When I start writing a reply to an existing email, I see the same effect you show in the second image. Based on that, it appears you need to invert the background as seen in mail (it goes from white to dark).CodeBender
@CodeBender Good point, as a workaround setting the background color of main UIWindow to .black resolves the ugliness and I think that's exactly how Apple would like to see in other apps. Thanks for the hint.kubilay
Great. I went ahead and summarized it as an answer.CodeBender

1 Answers

0
votes

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.