Skip to content

[Bug/Feature Request] Increase priority of Layout.interactionConstraint #424

@Argent

Description

@Argent

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
2021-01-02 10 04 40 2021-01-02 10 05 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions