Skip to content
This repository was archived by the owner on Jun 7, 2022. It is now read-only.
This repository was archived by the owner on Jun 7, 2022. It is now read-only.

Feature request: Set preferredContentSize #2

@benubois

Description

@benubois

Hi, thanks for making this!

I was watching the WWDC sheets session and at around the 9:15 mark, Russell mentions that the sheet should respect a preferredContentSize if widthFollowsPreferredContentSizeWhenEdgeAttached = true.

I was wondering if it would be possible to automatically set preferredContentSize in this component to something like view.systemLayoutSizeFitting(UIView.layoutFittingCompressedSize) so that the sheet only takes up the width of the contentView?

Or alternatively provide a way to set a preferredContentSize?

I failed to get this to work, but I was hoping you would know how to do it.

Here's the example from the session:

Before:

large

After:

small

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