title: Disable Swipe Gesture in SwifUI TabView
body: <p>Trying to implement a <code>TabView</code> with <code>PageTabView</code> style in <code>SwiftUI</code>, where navigation is only done programmatically, and all swipe gestures are disabled.</p>
  <p><a href="https://stackoverflow.com/questions/63168014/swiftui-2-0-tabview-disable-swipe-to-change-page">This solution</a> only partially works - if you tap the screen as the selection is changing, it still interferes with the transition and causes weird effects. Also, if you scroll with two fingers the gesture still registers. I need a solution that fully disables the swipe gesture.</p>
  <p>Code:</p>
  <pre><code>struct PageViewTest: View {
      @State var selection: Int = 1
      
      var body: some View {
          ZStack {
              Color.green.ignoresSafeArea()
              
              TabView(selection: $selection) {
                  Color.red
                      .tag(1)
                      .gesture(DragGesture())
                  
                  Color.blue
                      .tag(2)
                      .gesture(DragGesture())
                  
                  Color.yellow
                      .tag(3)
                      .gesture(DragGesture())
              }
              .tabViewStyle(PageTabViewStyle(indexDisplayMode: .never))
              .animation(.linear, value: selection)
              
              VStack {
                  Spacer()
                  Button(action: {
                      selection = selection == 3 ? 1 : selection + 1
                  }) {
                      Text(&quot;next&quot;)
                          .foregroundColor(.white)
                          .font(.title)
                  }
              }
          }
      }
  }
  </code></pre>
  <p>setting <code>.disabled(true)</code> to the <code>TabView</code> solves it, but then all of the subviews are no longer interactive.</p>