title: SwiftUI: Make ScrollView scrollable only if it exceeds the height of the screen
body: <p>Currently I have a view that looks like this.</p>
  
  <pre><code>struct StatsView: View {
      var body: some View {
          ScrollView {
              Text("Test1")
              Text("Test2")
              Text("Test3")
          }
      }
  }
  </code></pre>
  
  <p>This renders a view that contains 3 texts inside a scroll view, whenever I drag any of these texts in the screen the view will move cause its scrollable, even if these 3 texts fit in the screen and there is remaining space. What I want to achieve is to only make the ScrollView scrollable if its content exceeds the screen height size, if not, I want the view to be static and don't move. I've tried using GeometryReader and setting the scrollview frame to the screen width and height, also the same for the content but I continue to have the same behaviour, also I have tried setting the minHeight, maxHeight without any luck.</p>
  
  <p>How can I achieve this?</p>