iPhone X and bottom safe area inset

Viewed 3327

I am working on layout for iPhoneX and have an issue with action sheets and Safari browser. This is an extra space. I need that my action sheets display more at the bottom ? How can I do that? I guess I need to disable safe area but how can I do it?

The reason why it happens probably that I use 2 UIWindows: one for all content and the second to display banner at the bottom of the screen.

the space that is outlined - is something to hide my app from everyone :) It does not exist in the app!

I want the action sheet be closer to the bottom. It works well on all devices except iPhoneX. I have 2 UIWindows (one for all content and the second one for ad at the bottom). So, for iPhoneX the content window has probably some safe area inset and becaise of that action sheet shows not from the bottom edge

enter image description here enter image description here

1 Answers

You don't have to disable the Safe Areas for the View Controller. They are still useful for the top, trailing and leading edges.

To remove the grey bar all you need is to set the bottomAnchor or your containing view to your superView instead of the bottom safe area with a constant of what you need.

You can also further adjust safe area insets with additionalSafeAreaInsets. https://developer.apple.com/documentation/uikit/uiviewcontroller/2902284-additionalsafeareainsets That allows you to leave them as is for the edges that you don't want to modify.

Related