Hey Flo, thanks for the great video - would you happen to know how I can access the proxy reference if I have structured my view into multiple smaller view extensions? I'd love to have a ScrollViewReader at the top level but then in a module further down I have a DragGesture handler that needs to control the scroll position
Thanks for the nice words! You should be able to pass down the ScrollViewProxy to the "inside" View, e.g. like this: ScrollViewReader{ proxy in ... MyView(proxy: proxy) } I haven't tried this yet, but I know that it works for GeometryReaders, so I would also expect it to work for ScrollViewReader.
@@FloWritesCode Thanks for the prompt response. I actually don't know how I can pass arguments to a view extension (I only know how to pass them to a different view) but I did solve my issue by using a @State variable and an onChange listener. My view extension sets the @State variable deep down in the extension somewhere, and at the top level my scrollview has a onChange listener that sets the scrollTo based on the @State variable.