I have an app that needs to run on iOS9 - 11 and on iPhones other than X. I have built it with XCode 9 so that it gets the full iPhone X screen, but I can't seem to get it to display correctly with the notch. My app uses a custom UI view that draws itself within the bounds of the view (a fullscreen view). It Currently draws itself right underneath the notch. What I would like to do, is have it behave as it does in iOS9+ with iPhone 5+, but on an X draw a fullscreen backdrop, but only use the area away from the notch for interacting with the user. This includes both the top when in portrait but also the side when the phone is in landscape. I basically want to extend my insets to allow a margin under the notch so the user buttons are not obscured, as they currently are. I have tried safeLayoutBounds but can only seem to access that via the iOS11 only API.
To restate, I want to use the space for background use, but scoot controls, etc, away from the notch. So I would like to know: 1 - The screen size (which I already have), 2 - that the notch is there - which I assume I only tell by the phone model and orientation, 3 - What the bounds are that the notch covers so I can avoid it.
Here are two screen shots to illustrate, if it isn't clear. Sorry for the size, I tried to adjust them smaller:
Landscape notch covers buttons
Portrait it covers the display