Closed flowbe closed 2 years ago
After investigating, I noticed that the constraints on the content view are given a lower priority ($0.priority = .required - 1
) which leads to this issue. When commenting the line, everything works fine. Why are you doing this?
@flowbe Could you please let me know whether your panel'sFloatingPanelController.contentMode
is .static
or . fitToBounds
? The reason why the priority was set to .required - 1
is #359, which fixed #294. However #294 was an issue on . fitToBounds
content mode. So if your panel’s content mode is .static
, I’d like to the priory will be set to .required
on .static
content mode.
Hi @scenee, we didn't change the contentMode
variable so it is set to the default value, which is apparently .static
@flowbe Thanks for your information. I will change the priority on .static
content mode.
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? Thanks a lot
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