title: SwiftUI TabView inside a ScrollView
body: <p>Problem: My <code>TabView</code> with <code>PageTabViewStyle</code> has content of different heights. I can swipe between different pages, however inside the <code>ScrollView</code> my <code>TabView</code> shrinks to 0 height.</p>
  <p>Expected: <code>TabView</code> has height of the largest child view.</p>
  <p>I have encountered similar problem before, but just hardcoded approximate frame height of largest view, but it doesn't seem right way to go. Any ideas much appreciated.</p>
  <pre class="lang-swift prettyprint-override"><code>struct ContentView: View {
      var body: some View {
  //        ScrollView {
              VStack {
                  TabView {
                      ForEach(1..&lt;5, id:\.self) { index in
                          VStack {
                              DifferentSizeViews(times: index)
                              Spacer()
                          }
                      }
                  }
                  .tabViewStyle(PageTabViewStyle(indexDisplayMode: .never))
                  
                  Text(&quot;Some other content&quot;)
              }
          }
  //    }
  }
  
  struct DifferentSizeViews: View {
      var times: Int
      var body: some View {
          VStack {
              ForEach(0..&lt;times, id:\.self) { index in
                  Text(&quot;some text \(index)&quot;)
              }
          }
      }
  }
  </code></pre>