You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
jeffc-dev
changed the title
Implement .onPreferenceChange support...
Implement .onPreferenceChange...
Feb 26, 2025
Uh oh!
There was an error while loading. Please reload this page.
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
?The text was updated successfully, but these errors were encountered: