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

incorrect layout on iPhone 11 #8

Closed
SogoGolf opened this issue Apr 26, 2020 · 3 comments
Closed

incorrect layout on iPhone 11 #8

SogoGolf opened this issue Apr 26, 2020 · 3 comments

Comments

@SogoGolf
Copy link

hi, i ran the example app on iPhone 11 and it was not rendering correctly for some reason. there's a large black space/area above the nav bar. Also, the nav bar is sitting too low.

XCode Version 11.4.1 (11E503a)
target: iOS 13.4

2020-04-26_18-52-17

@BilalShahid13
Copy link
Owner

BilalShahid13 commented Apr 26, 2020

I think you are probably running the sample project. That project is using the customWidget property with a custom widget. Your device is recognized as an iPhone with a notch (notched iPhones have more height to their bottom nav bar) so the default padding is being set as 90.0 as navBarHeight is left empty. But the height of that custom widget is 60.0. That is why you are seeing that black bar.

Set the navBarHeight as 60.0 and the black strip will disappear. Alternatively, you can set the height of the custom widget as 90.0. That will also fix the issue with nav bar sitting too low :)

This was just an explanation of what is happening. I would recommend using the styles that I have provided as you will not encounter this issue there because I'm handling the height and the padding for them. This is for developers who want to style their own navBar so I'm expecting them to handle this themselves.

I will fix the sample project and push an update soon. Thanks for letting me know!

@SogoGolf
Copy link
Author

ahh lol yes your right! sorry about that. still good to know that the custom nav bar option is there etc. we may need it, shall see.

@BilalShahid13
Copy link
Owner

BilalShahid13 commented Apr 29, 2020

The sample project is updated. Also now you can provide a fixed height for all devices even in the custom widget scenario. It will handle it for notched devices.

Check the version 1.4.4 for this.

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

No branches or pull requests

2 participants