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

CB-13394: (ios) Hide status bar in iPhone X landscape #88

Closed
wants to merge 2 commits into from

Conversation

dnfield
Copy link

@dnfield dnfield commented Oct 4, 2017

Platforms affected

iOS 11, on iPhone X

What does this PR do?

Hides the statusbar in landscape mode on iPhone X devices

What testing has been done on this change?

Testing in emulator

Checklist

  • Reported an issue in the JIRA database
  • Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
  • Added automated test coverage as appropriate for this change.

This change fixes issues with statusbar visibility while in landscape mode on an iPhone X. The status bar should not be visible in landscape mode on the new devices, and visibility should be restored when in Landscape (unless hide() has been called from JavaScript).

@dnfield dnfield changed the title Hide status bar in iPhone X landscape CB-13394: (ios) Hide status bar in iPhone X landscape Oct 4, 2017
@jcesarmobile
Copy link
Member

Thanks for the PR and sorry for not spotting it before.

Instead of creating a new variable _hideCalledFromExternalyou could have used _statusBarVisible as it has the same value.

I don't think hiding the statusbar on iPhone X when in landscape is the right approach here as it looks like a bug to me, it should respect the value on prefersStatusBarHidden, iPhone X is the only one ignoring that value, so I think that might change in a future version. My approach uses current status bar size for the bar, as right now iPhone X doesn't have the status bar in landscape, has height 0 and the fake view it's not shown neither, but if that changes in the future and iPhone X starts respecting prefersStatusBarHidden value my approach will continue working, while yours will always hide the status bar.

Also your approach doesn't work fine when running in iPhones different from iPhone X and you call show when the in-call/hot-spot status bar is present and after that you rotate, the background view will remain with 40pt when rotated to landscape instead of resizing to 20pt (current size as in-call/hot-spot status bar is 20pt in landscape).

So, for now I'll keep my approach, but I'm still waiting for review from other users. So, please, can you give it a try?

@asfgit asfgit closed this in cdc9295 Oct 20, 2017
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

2 participants