UIKit should have API to indicate status bar transparency

Number:rdar://34923447 Date Originated:10-Oct-2017 04:55 PM
Status:Open Resolved:
Product:iOS + SDK Product Version:iOS 11
Classification:Enhancement Reproducible:Not Applicable
There are (at least) 2 situations where status bar transparency is important:

1. On iPhone X, content that the status bar can safely overlap is not drawn at all in the notch. While it may be acceptable to draw certain content with status bar elements overlapping, it isn’t always acceptable for content to be entirely clipped—in this case by the notch.

2. A similar problem happens on on "classic" phones with a double-height status bar. The green/blue/red status bar doesn’t just become twice as tall as the regular status bar, it also becomes opaque (to more cleary show the blinking text). Content that’s fine to be laid out underlapping the transparent status bar there is now covered by a 44pt tall, opaque bar.

Perhaps a `UIDevice.hasTransparentStatusBar` isn’t the best API to accomplish this, but something that developers can use to solve the problems above without having to make device and status bar height/safeAreaInsets checks would be nice.

Steps to Reproduce:

Expected Results:

Actual Results:

iOS 11



Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!