How to track contentSize and scroll offset for ScrollView in SwiftUI
Issue #829 Use PreferenceKey with a custom coordinateSpace to make our own TrackableScrollView. Note that the offset here is in reversed to contentOffset in normal UIScrollView import SwiftUI struct TrackableScrollView<Content: View>: View { @ViewBuilder let content: (ScrollViewProxy) -> Content let onContentSizeChange: (CGSize) -> Void let onOffsetChange: (CGPoint) -> Void var body: some View { ScrollViewReader { reader in ScrollView(showsIndicators: false) { GeometryReader { geo in Color.clear.preference( key: ScrollOffsetKey.self, value: geo.frame(in: ....