IOS how to avoid notch on IPhone

Using MG 3.8 my game ui is heavily cut by the notch on iphonex, but i’d rather not move it to the left as a general rule, as it would damage usability on ipad and pre-iphoneX devices.
A “future-proof” solution would be great, but i can accomodate hacks if nothing else works.

Sorry for not being an iOS-Expert, but perhaps a look at this might help:
https://medium.com/@cafielo/how-to-detect-notch-screen-in-swift-56271827625d

Perhaps you can detect the SafeArea from within C# when on iOS.

Thank you for the answer, i actually did follow this guide:
https://developer.apple.com/forums/thread/111444
and came up with this code that needs to be called in an update… i didn’t even consider that maybe Monogame is doing this “behind the curtains” following the xbox360 usage of safe zone.

    internal static void PostInitialize()
    {
        var window = uiapp.KeyWindow;

        float scale = (float)Xamarin.Essentials.DeviceDisplay.MainDisplayInfo.Density;
        GraphicSettings.safezone_offset_top_px_window = (int)(window.SafeAreaInsets.Top * scale);
        GraphicSettings.safezone_offset_bottom_px_window = (int)(window.SafeAreaInsets.Bottom * scale);
        GraphicSettings.safezone_offset_left_px_window = (int)(window.SafeAreaInsets.Left * scale);
        GraphicSettings.safezone_offset_right_px_window = (int)(window.SafeAreaInsets.Right * scale);
    }
1 Like

Thank you for sharing,
i am sure i can use this in the future, too.

I’m not an IOS expert either. However, it may be worth checking if you can only render on the bottom 90% of the screen on your IOS version?

What’s the point of exhumating old dead topics?

I see the resident troll is running his mouth again. I’m still waiting to see you actually try to help somebody instead of making your rude comments.

You’re not gonna help anyone by digging out old irrelevant topics and not even answering the question.