I have a swiftui project. I am using pageview. Normally, when it comes to the last page, it does not scroll further because the pages are finished. What I want is this: the pages continue after reaching the last page. Let's start again from the first page. so I want my page order to be like this:
page 1 -> page 2 -> page 3 -> page 1 -> page 2 -> page 3 -> page 1 .....
I want it to repeat itself like this all the time.
struct PageControllerView: View {
var body: some View {
TabView {
Text("page 1")
Text("page 2")
Text("page 3")
}
.tabViewStyle(PageTabViewStyle(indexDisplayMode: .never))
}
}