33.5 Adding View Paging
If the app were to be previewed at this point, the first view would appear but there would be no way to navigate to the other views. One way to implement navigation is to apply PageTabViewStyle to the TabView. This will allow the user to move between the three views by making left and right swiping motions on the screen. To apply this style, add the tabViewStyle() modifier to the TabView as follows:
var body: some View {
TabView {
Text("First Content View")
Text("Second Content View")
Text("Third Content View")
}
.font(.largeTitle)
.tabViewStyle(PageTabViewStyle())
}
With the changes made, use Live Preview to test the view and verify that swiping left and right moves...