Skip to content

Implement .onPreferenceChange... #133

@jeffc-dev

Description

@jeffc-dev

I have a fairly complex layout scenario which would benefit from the following technique (scroll down to "Using a preference key"):

https://swiftbysundell.com/questions/syncing-the-width-or-height-of-two-swiftui-views/

I use this in my iOS code and it works well.

Unfortunately, while Skip does seem to support PreferenceKey generally, .onPreferenceChange is not supported. This prevents me from being able to get the CGSize of a view and use it for calculations as needed.

Would it be possible to implement .onPreferenceChange?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions