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-13291: iOS 11 statusbar fixes #86

Closed
wants to merge 5 commits into from

Conversation

BrainstemStudio
Copy link

  1. Added new property "StatusBarCropsWebview" to allow iPhone X to display edge to edge using the "safeAreaInsets" top and bottom. By default this will be set as "true" and crop the webview below and above the safe areas

  2. When "StatusBarCropsWebview" is set to false. The web view will extend to the correcr full screen on iPhone X. However, is the "StatusBarOverlaysWebView" is to false. This will only extend the web view at the bottom edge

  3. If both StatusBarCropsWebview and “StatusBarOverlaysWebView” are set to false this will extend the screen top and bottom edge.

  4. Added fix for iOS 11 gap problems. If “StatusBarOverlaysWebView” is set to false, this now fixes the 20px bottom gap.

  5. Added fix for iOS 11 gap after status bar is set to hidden after showing. This now fixes the 20px bottom gap.

  6. Added fix for iPad to force web view status bar to not run if app for iPhone but running on iPad. Requirement from apple.

See https://issues.apache.org/jira/browse/CB-13291 for full details

Platforms affected

What does this PR do?

What testing has been done on this change?

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.

1. Added new property "StatusBarCropsWebview" to allow iPhone X to display edge to edge using the "safeAreaInsets" top and bottom. By default this will be set as "true" and crop the webview below and above the safe areas

2. When "StatusBarCropsWebview" is set to false. The web view will extend to the correcr full screen on iPhone X. However, is the "StatusBarOverlaysWebView" is to false. This will only extend the web view at the bottom edge

3. If both StatusBarCropsWebview and “StatusBarOverlaysWebView” are set to false this will extend the screen top and bottom edge.

4. Added fix for iOS 11 gap problems. If “StatusBarOverlaysWebView” is set to false, this now fixes the 20px bottom gap.

5. Added fix for iOS 11 gap after status bar is set to hidden after showing. This now fixes the 20px bottom gap.

See https://issues.apache.org/jira/browse/CB-13291 for full details
@mhartington
Copy link

With StatusBarCropsWebview, does this override/breaks the expected behavior of viewport-fit? In my tested, most of the sizing/cropping settings can be fixed just by adding viewport-fit=cover to the viewport meta tag.

If this setting does something similar, I'd think it would not be necessary.

Added fallback for iOS 10 where safeAreaInets are not available
This reverts commit f05b26f.
1. Added new property "StatusBarCropsWebview" to allow iPhone X to display edge to edge using the "safeAreaInsets" top and bottom. By default this will be set as "true" and crop the webview below and above the safe areas

2. When "StatusBarCropsWebview" is set to false. The web view will extend to the correcr full screen on iPhone X. However, is the "StatusBarOverlaysWebView" is to false. This will only extend the web view at the bottom edge

3. If both StatusBarCropsWebview and “StatusBarOverlaysWebView” are set to false this will extend the screen top and bottom edge.

4. Added fix for iOS 11 gap problems. If “StatusBarOverlaysWebView” is set to false, this now fixes the 20px bottom gap.

5. Added fix for iOS 11 gap after status bar is set to hidden after showing. This now fixes the 20px bottom gap.

See https://issues.apache.org/jira/browse/CB-13291 for full details
@BrainstemStudio
Copy link
Author

@mhartington Testing now, did not know about viewport-fit will let you know what my test reveal, if it is unnecessary will remove the property.

@BrainstemStudio
Copy link
Author

BrainstemStudio commented Sep 17, 2017

@mhartington You are correct. The viewport-fit=cover makes doe fix the problem without the need to add the new property.

I see you have already submitted a fix for this which does work when using viewport-fit=cover. I think it would be best for me to remove my pull request and rather let yours make the change.

I would however like to suggest you add #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000
where you use iOS 11 safearea, so errors can be avoided in previous version of xcode.

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