Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to preserve status bar space #488

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

juanj
Copy link

@juanj juanj commented Nov 5, 2021

Since iOS 13 it is no longer possible to show a view over the status bar. The workaround for this is to hide the status bar before showing the view (see #335).

The issue with this, is that when hiding the status bar on a device without a notch, the window safe area is updated to reflect this, and the content of the app is moved up.

This PR aims to solve this by adding a new option, Config.preserveStatusBarSpace, that when set to true takes the previous window safeAreaInsets and applies it to the root view controller before showing the new window, and sets it back when removing the window.

I decide to set it to false by default to preserve the existing behavior. Let me know if you see any big implications of adding this change that I may have overlooked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant