title: Getting and setting the position of content in a SwiftUI ScrollView
body: <p>I have a horizontal scroll view where I'd like to set a position programmatically. Here is the body of the view:</p>
  
  <pre class="lang-swift prettyprint-override"><code>let radius = CGFloat(25)
  let scrollWidth = CGFloat(700)
  let scrollHeight = CGFloat(100)
  let spacing = CGFloat(20)
  let circleDiameter = CGFloat(50)
  
  ...
  
      var body: some View {
          GeometryReader { viewGeometry in
              ScrollView () {
                  VStack(spacing: 0) {
                      Spacer(minLength: spacing)
  
                      Circle()
                          .fill(Color.black.opacity(0.5))
                          .scaledToFit()
                          .frame(width: circleDiameter, height: circleDiameter)
  
                      ScrollView(.horizontal) {
                          Text("The quick brown fox jumps over the lazy dog. Finalmente.")
                              .font(Font.title)
                              .frame(width: scrollWidth, height: scrollHeight)
                              .foregroundColor(Color.white)
                              .background(Color.white.opacity(0.25))
                      }
                      .frame(width: viewGeometry.size.width, height: scrollHeight)
                      .padding([.top, .bottom], spacing)
  
                      Circle()
                          .fill(Color.white.opacity(0.5))
                          .scaledToFit()
                          .frame(width: circleDiameter, height: circleDiameter)
  
                      Spacer(minLength: spacing)
                  }
                  .frame(width: viewGeometry.size.width)
              }
              .background(Color.orange)
          }
          .frame(width: 324 / 2, height: spacing * 4 + circleDiameter * 2 + scrollHeight) // testing
          .cornerRadius(radius)
          .background(Color.black)
      }
  </code></pre>
  
  <p>How do I change this code so that I can get the current position of "The quick brown fox" and restore it at a later time? I'm just trying to do something like we've always done with <code>contentOffset</code> in UIKit.</p>
  
  <p>I can see how a <code>GeometryReader</code> might be useful to get the content's current frame, but there's no equivalent writer. Setting a <code>.position()</code> or <code>.offset()</code> for the scroll view or text hasn't gotten me anywhere either.</p>
  
  <p>Any help would be most appreciated!</p>