title: How to animate the page change with TabView on SwiftUI
body: <p>I'm trying to create a TabView and it works fine, but I would like to animate the view change, but all I could find is to animate with the PageTabViewStyle, but it makes the screen draggable, which is something I don't want to. I think I could remove this gesture, but the tabView gets tiny, as the iOS Home Screen indicators.</p>
  <p>So, basically I would like to change the animation between the Views, here's my current code:</p>
  <pre><code>struct MainView: View {
  @State private var selectedTab = 0
  private var pageTitles = [&quot;Home&quot;, &quot;Home2&quot;]
  
  var body: some View {
      TabView(selection: $selectedTab) {
          HomeView(test: .green)
              .tabItem {
                  Image(systemName: &quot;house.fill&quot;)
                  Text(&quot;Home&quot;)
              }.tag(0)
          HomeView(test: .blue)
              .tabItem {
                  Image(systemName: &quot;house.fill&quot;)
                  Text(&quot;Home2&quot;)
              }.tag(1)
      }
      .navigationTitle(Text(pageTitles[selectedTab]))
      .navigationBarTitleDisplayMode(.inline)
  }
  </code></pre>
  <p>}</p>