7
TabView(selection: $vm.selectedTab) {
   PlanCard_PositiveDay(vm: vm).tag(0)
   PlanCard_CountdownDay().tag(1)
   PlanCard_Basalkcal().tag(2)
   PlanCard_ActivityDiet().tag(3)
   PlanCard_Schedule().tag(4)
   PlanCard_WeightTarget().tag(5)
}
.tabViewStyle(PageTabViewStyle.init(indexDisplayMode: .never))

I use TabView with PageTabViewStyle to build a pageView, but I want to click some button to change position, not auto-scroll to change position with finger gesture, so I want to disable auto-scroll, How can I update my code To achieve this

Thx!

wanbo
  • 776
  • 6
  • 22
  • Does this answer your question? [SwiftUI 2.0 TabView disable swipe to change page](https://stackoverflow.com/questions/63168014/swiftui-2-0-tabview-disable-swipe-to-change-page) – koen Dec 09 '20 at 20:00

0 Answers0