I have an application that I want to go full screen (hiding the status bar) on iPhones that do not have a notch, but stick to the safe area (keeping the status bar visible) on iPhones that have a notch, like the iPhone X.
I cannot just restrict my application to the safe area on all devices, since the safe area includes the status bar on iPhones that do not have a notch.
The approaches I can think of are:
- Checking the device model, or
- Looking at the safe area insets for the main
UIWindow
and trying to infer something from the actual values (e.g. "if top inset is >22, then it has a notch")
None of the above is very clean, not future-proof.