Started adding scroll-in-play to MagnifierView. I spent most of today trying to use GeometryReader to expose the ScrollView offset, but I think I only need that for the last point below:

  • Create an invisible playhead that represents current position with an ID that can be addressed by ScrollViewReader
  • On Position change, update the position of the invisible playhead and use ScrollViewReader(scrollTo:) to jump to the id of the playhead.
  • On scroll, set the position to the current scroll offset

Tomorrow: work through each of these steps in turn.

Tags:

Categories:

Updated: