title: SwiftUI - ScrollViewReader's scrollTo does not scroll
body: <p>I have a simple <strong>SwiftUI</strong> list that I want to scroll to a row when a user click on a button. I have copied this code from <a href="https://www.hackingwithswift.com/quick-start/swiftui/how-to-scroll-to-a-specific-row-in-a-list" rel="noreferrer">hackingwithswift</a>. It suppose to work, but it does not do.</p>
  <pre><code>struct ContentView: View {
      var body: some View {
          ScrollViewReader { proxy in
              VStack {
                  Button(&quot;Jump to #50&quot;) {
                      proxy.scrollTo(5, anchor: .top)
                  }
  
                  List(0..&lt;100) { i in
                      Text(&quot;Example \(i)&quot;)
                      .id(i)
                  }
              }
          }
      }
  }
  
  struct ContentView_Previews: PreviewProvider {
      static var previews: some View {
          ContentView()
      }
  }
  </code></pre>
  <hr />
  <p>I tested it on iOS 14.2 both on simulator and a physical device.</p>
  <p>I read its <a href="https://developer.apple.com/documentation/swiftui/scrollviewproxy/scrollto(_:anchor:)" rel="noreferrer">documentation</a>, but there is not much info.  So how to scroll to a row, for example, row 50?</p>