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

Prevent PassthroughWindow from overriding status bar style #22

Closed
wants to merge 1 commit into from

Conversation

ky1vstar
Copy link
Contributor

Hi! When presenting Drop above view controller that has preferredStatusBarStyle set to .lightContent there is a bug. Status bar turns to black while Drop is presented, and turn back to expected color (white) when dismissed. This PR fix this behaviour using UIWindow's private API override. There are several open radars related to this, but none of them is fixed. This fix is totally safe and we are using it in App Store without any issues for three years now.

@omaralbeik
Copy link
Owner

Thanks @ky1vstar and apologies for the late response

I'm against the use of any private APIs in libraries, even if it is a know issue, I added a workaround in v1.3.0 that gets the top view controller's status bar style before showing a drop, and uses it in the temp window that is used to show drops.
Please let me know if this does not fix the issue, so we can try something else

@aheze
Copy link

aheze commented Jul 25, 2022

@ky1vstar @omaralbeik just found this thread. I had the same problem a while ago in Popovers. We ultimately went with not creating a new UIWindow and instead just overlaying a view controller as a subview.

The private API looks handy though, I'll investigate.

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.

3 participants