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

Fix screen layout with non-translucent header on iOS. #222

Merged
merged 1 commit into from
Nov 13, 2019

Conversation

kmagiera
Copy link
Member

After #184 we no longer were acconting for the size of navigation bar when laying out screens on the stack. This was causing elements to be drawn under a non-translucent bar unless SafeAreaView's been used. As this seem not to be desirable in most of the cases (there is no way of seeing items rendered underneath non-translucent header) this change brings back the previous behavior. Instead of using manual method of calculating top inset as it's been done before we rely on edgesForExtendedLayout property of the view controller.

After #184 we no longer were acconting for the size of navigation bar when laying out screens on the stack. This was causing elements to be drawn under a non-translucent bar unless SafeAreaView's been used. As this seem not to be desirable in most of the cases (there is no way of seeing items rendered underneath non-translucent header) this change brings back the previous behavior. Instead of using manual method of calculating top inset as it's been done before we rely on edgesForExtendedLayout property of the view controller.
@kmagiera kmagiera merged commit 62123f1 into master Nov 13, 2019
@dylancom
Copy link
Contributor

dylancom commented Jun 6, 2023

@kmagiera this causes a layout shift (noticable if you have a screen that vertically centers it's content).
As the view will be larger on initial render.
On an iPhone 14 Pro the initial height is 773, which becomes 675.3333129882812 after taking into account "UIRectEdgeNone".
Upon disabling this PR the height will just stay: 773.

Desired: having a correct height of directly 675 or maybe hiding the content until correct height is calculated?

@kkafar kkafar deleted the fix-translucent-layout branch September 15, 2023 12:15
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.

2 participants