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
In some circumstances (e.g. when switching out the contents of an article view with a new article) it makes sense for a scroll view to reset its scroll position to the top, and in other circumstances (e.g. a text editor) it makes more sense for a scroll view to maintain its scroll position when its contents are updated. SwiftUI defaults to the latter option (cause even when it's not the best option, it's still usable).
SwiftUI currently has no API for this (afaik), so we get to make up something ourselves 🥳 suggestions welcome!
If there's a workaround for this in SwiftUI I'd be interested to know what it is, because perhaps the workaround is how you're meant to do things in the first place (but I still think that this API would be useful either way).
The text was updated successfully, but these errors were encountered:
In some circumstances (e.g. when switching out the contents of an article view with a new article) it makes sense for a scroll view to reset its scroll position to the top, and in other circumstances (e.g. a text editor) it makes more sense for a scroll view to maintain its scroll position when its contents are updated. SwiftUI defaults to the latter option (cause even when it's not the best option, it's still usable).
SwiftUI currently has no API for this (afaik), so we get to make up something ourselves 🥳 suggestions welcome!
If there's a workaround for this in SwiftUI I'd be interested to know what it is, because perhaps the workaround is how you're meant to do things in the first place (but I still think that this API would be useful either way).
The text was updated successfully, but these errors were encountered: