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 iOS 11/iPhone X support #169
Conversation
- Use safeAreaInsets on iOS 11 - compensate for erroneous 20 px top inset with hidden status bar on iOS 11 - add missing .deleteLayout to handling of GalleryConfiguration Closes Krisiacik#164
Hmm, hold off on approving this one. Seems |
These changes correct behavior around status bar visibility and ensures that controls have identical placement between iOS 11 and iOS 10 (and below). - remove laziness of `defaultInsets`. It may return an empty set of insets early on. - on iOS 10 and below, add a top inset of 20px when `statusBarHidden == false`, so it matches what we’d get on iOS 11 - on iOS 11, reduce the top inset by 20px when `statusBarHidden == true` or we’re running on an iPhone X (since the status bar is up in the “ears”, the status bar effectively takes up no space)
Ok, this now works to my satisfaction. Please let me know what you think. Note is probably a breaking change for anyone who was manually working around these issues. |
LGTM 👍 |
@humblehacker do you mind adding a gif or an image of your work? |
Guess we can reuse the screenshot from #164 - maybe add a line to |
@humblehacker Do I have to do anything extra to activate this? This changes doesn't work for me in iPhone X.
and it is initiated like =
|
@humblehacker never mind, had to do |
@ugenlik Glad you got it working. You can also use |
* Add iOS 11/iPhone X support - Use safeAreaInsets on iOS 11 - compensate for erroneous 20 px top inset with hidden status bar on iOS 11 - add missing .deleteLayout to handling of GalleryConfiguration Closes Krisiacik#164 * Improve handling of status bar These changes correct behavior around status bar visibility and ensures that controls have identical placement between iOS 11 and iOS 10 (and below). - remove laziness of `defaultInsets`. It may return an empty set of insets early on. - on iOS 10 and below, add a top inset of 20px when `statusBarHidden == false`, so it matches what we’d get on iOS 11 - on iOS 11, reduce the top inset by 20px when `statusBarHidden == true` or we’re running on an iPhone X (since the status bar is up in the “ears”, the status bar effectively takes up no space)
Closes #164