Skip to content

Implement .onPreferenceChange... #133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jeffc-dev opened this issue Feb 26, 2025 · 0 comments · May be fixed by #210
Open

Implement .onPreferenceChange... #133

jeffc-dev opened this issue Feb 26, 2025 · 0 comments · May be fixed by #210

Comments

@jeffc-dev
Copy link

jeffc-dev commented Feb 26, 2025

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?

@jeffc-dev jeffc-dev changed the title Implement .onPreferenceChange support... Implement .onPreferenceChange... Feb 26, 2025
@dfabulich dfabulich linked a pull request May 21, 2025 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant