Description
I have the requirement that my floating panel always displays a button at the bottom of the sheet. If the panel size is increased (dragged up) the button should stay at the bottom of the screen.
To achieve this I'm using fpc.contentMode = .fitToBounds to fit the content of my custom ViewController to the size of the panel.
However with fitToBounds it prevents my panel from being dragged out of the screen in the bottom direction.
I found out that the reason for this is the priority of Layout.interactionConstraint which is set to .defaultHigh. If the priority is set to .required everything works as expected.
Unfortunately the constraint is not accessible from outside the framework and thus its not easy to change the priority.
It would be good to change the priority to .required for default or at least make it configurable.
Expected behavior
I can drag the panel in bottom direction even if .fitToBounds is enabled
Actual behavior
The priority of interactionConstraint is too low so that the VCs intrinsic height blocks the panel from being dragged in bottom direction
| Actual behavior |
Expected behavior |
 |
 |
Description
I have the requirement that my floating panel always displays a button at the bottom of the sheet. If the panel size is increased (dragged up) the button should stay at the bottom of the screen.
To achieve this I'm using
fpc.contentMode = .fitToBoundsto fit the content of my custom ViewController to the size of the panel.However with
fitToBoundsit prevents my panel from being dragged out of the screen in the bottom direction.I found out that the reason for this is the priority of
Layout.interactionConstraintwhich is set to.defaultHigh. If the priority is set to.requiredeverything works as expected.Unfortunately the constraint is not accessible from outside the framework and thus its not easy to change the priority.
It would be good to change the priority to
.requiredfor default or at least make it configurable.Expected behavior
I can drag the panel in bottom direction even if
.fitToBoundsis enabledActual behavior
The priority of
interactionConstraintis too low so that the VCs intrinsic height blocks the panel from being dragged in bottom direction