title: Create Parallax using SwiftUI
body: <p>I'm trying to create a parallax effect using SwiftUI.</p>
  
  <p>This is my implementation :</p>
  
  <pre><code>import SwiftUI
  
  struct ContentView: View {
  
      @State var parralaxOffset: CGFloat = 0
  
      var body: some View {
          ZStack {
              ScrollView {
                  Text("Background")
              }.offset(x: 0, y: parralaxOffset)
  
             ScrollView {
                  GeometryReader { reader in
                      Text("Foreground contentOffset: \(reader.frame(in: .global).minY)")
                  }
              }
          }
      }
  }
  </code></pre>
  
  <p>My question is: how to set the <code>reader.frame(in: .global).minY)</code> into the <code>parralaxOffset</code> variable ?</p>