-
Notifications
You must be signed in to change notification settings - Fork 168
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
Presenting in popover on iOS 13 displays with incorrect insets #68
Comments
This could certainly be fixed in a custom |
Playing around with this some more, since the separator view and constraints are all private, fixing this in a custom cell subclass would require a bunch of messy code and workarounds. |
I was able to get this sorted by responding to Since this is likely a common issue in popovers on iOS 13, it would be awesome if this was built into the base class. Any feedback on this would be great and I'd be happy to work on a fix. |
hey @colinhumber thanks for reporting this! We'll take a look at this - if you could share some of your code for a fix, we'll get back to you with a proposed solution for this issue. |
Awesome! This fixes it if the fix is directly within
Since the separator constraints are private, I wasn't able to fix it in a
|
@apang42 Hey! Just wanted to follow up and see if there had been any internal discussions about this. Thanks! |
Any updates on this fix? |
On iOS 13, the view that's displayed within a popover now extends to include the popover arrow. As a result, additional safeAreaInsets are applied to include the arrow.
When presenting an AloeStackView in a popover with the arrow pointing left or right, this currently isn't being taken into account. As a result, the cell insets (content and separator) are too close to the edges. I've tracked this down to
insetsLayoutMarginsFromSafeArea = false
being partially the culprit, as well as the separator leading/trailing constraints not taking the safe area into account.I haven't seen any visual issues in the sample app, or my own projects with
insetsLayoutMarginsFromSafeArea
enabled, so I'm not sure if there is a specific reason for this being disabled in the Airbnb app. When I test this out with the default value set (true), everything works as expected (tested on iOS 11, 12, and 13).I've included a screenshot of the issue on iOS 13. As you can see, the content is too close to the left side of the popover.
With
insetsLayoutMarginsFromSafeArea
enabled and the separators taking the safe area into account, everything looks as expected (tested on iOS 11, 12, and 13).Ignore the switch cell extending off the right hand side. That's not an issue with the stack view, just some internal constraints in one of the sample cells.
The text was updated successfully, but these errors were encountered: