How to change PageTabView programmatically in iOS 14, SwiftUI 2?
问题 I'm exploring new things came in Xcode 12 and SwiftUI 2.0 I have created a pageview onboarding screen with TabView and PageTabViewStyle in Xcode 12, iOS 14, Swift UI 2. I want to add the next button when clicking on it, the page should move to the second view. Here Text("Hello") . struct OnBoardingView: View { var body: some View { TabView { Text("Hi") Text("Hello") Text("Welcome") } .tabViewStyle(PageTabViewStyle()) .indexViewStyle(PageIndexViewStyle(backgroundDisplayMode: .always)) } } 回答1: