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

Support safe area insets where appropriate #37

Open
gcox opened this issue Mar 4, 2019 · 2 comments
Open

Support safe area insets where appropriate #37

gcox opened this issue Mar 4, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@gcox
Copy link

gcox commented Mar 4, 2019

Currently, the safe area is ignored. If a collection view is rendered on an iPhone X in landscape, the cells under run the safe area. A workaround is to add the left or right safe area inset to the cellPeekWidth and reconfigure the delegate implementation when the view transitions sizes. Easy enough, but feels like it should be handled automatically or as another configuration argument.

@MaherKSantina
Copy link
Owner

Thank you @gcox for raising this issue! I just checked it on iPhone X and you're right it's not being positioned properly, I'll look into it as soon as possible.

@MaherKSantina MaherKSantina added the bug Something isn't working label Mar 4, 2019
@MaherKSantina
Copy link
Owner

Hello @gcox ! Apologies it's been a while since I got back to you. I've been looking into this and it feels that this problem is related to any flow layout not just this implementation. Also, this implementation doesn't know the hierarchy outside its collection view, and I think it's better this way. Otherwise, this implementation would be doing too much and it defies the separation of concerns concept. I understand that you don't want to implement this in the view controller to avoid the repetition of code, but we might be able to create an extension for UIViewController which fixes this problem and we can use that instead. Either ways, it's something we can do for a regular collection view also to avoid having the cells span behind the notch.
Let me know your thoughts about that 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants