-
-
Notifications
You must be signed in to change notification settings - Fork 513
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
Wrong layout when rotating screen #515
Comments
After investigating, I noticed that the constraints on the content view are given a lower priority ( |
@flowbe Could you please let me know whether your panel's |
Hi @scenee, we didn't change the |
@flowbe Thanks for your information. I will change the priority on |
Hi @scenee, I saw that you made a PR for this issue, thanks a lot! Can you create a new release so I can update my project? |
I've released v2.5.1 now 👍 Thanks for your support and patient. |
Description
We recently transitioned one of our floating panels from a
UITableView
to aUICollectionView
using compositional layouts. After transitioning, we noticed that when rotating the screen (portrait > landscape > portrait), our layout would keep the landscape size. We didn't have this issue before.We tried updating both the collection view layout and the panel layout in
viewWillTransition
but nothing works. Could this be a bug related to collection views?Expected behavior
Update the layout width accordingly to the orientation.
Actual behavior
When switching from landscape to portrait, the landscape width is kept.
Steps to reproduce
Code example that reproduces the issue
Our collection view layout looks like this:
The complete code is available here.
How do you display panel(s)?
Add as child view controllersHow many panels do you displays?
2+Environment
Library version
2.5.0
Installation method
CocoaPodsCarthageiOS version(s)
15.0
Xcode version
13.1
The text was updated successfully, but these errors were encountered: