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
{{ message }}
Repository navigation
ScrollViewWithOnScrollChanged: move onto onScrollGeometryChange or deprecate it #25
ScrollViewWithOnScrollChanged (Components/Geometry/ScrollViewWithOnScrollChanged.swift) reports the scroll offset with a hand-rolled probe. The probe is a zero-size LocationReader placed at the top of the content, inside a named coordinate space. It exists because onScrollGeometryChange(for:of:action:) was not available. That API is iOS 18, and after #15 it is available at the package floor.
The system API reads contentOffset directly. The probe has two weaknesses the system API doesn't:
it depends on the probe staying the first child of the content;
ScrollViewWithOnScrollChanged is public API. Removing or reworking it is a breaking change, and #15 deliberately left the public surface untouched.
Consumer
dashwallet-ios develop has one call site: DashWallet/Sources/UI/Menu/Settings/LocalCurrency/LocalCurrencyView.swift:146. That code uses onScrollChanged(offset) for its header.
Options
Keep the type and its signature, and reimplement it on onScrollGeometryChange. This is not a breaking change. The sign and origin of the offset must stay the same as today's LocationReader value.
Deprecate it (@available(*, deprecated, message: "Use onScrollGeometryChange")), move LocalCurrencyView to the system API, and remove the type in a later release.
Whichever option is chosen, update docs/utilities.md, docs/README.md and the README table.
Activity