Hi,
I am looking to display (in SwiftUI) the Tabview page dots like in the weather app in the toolbar, an important thing is I want to keep page controls by tapping and scrubbing.
Actually, I want to do what's on Apple Design's Page Controls page; here's the link and a photo of what I'd like to do.
Could you help me?
https://developer.apple.com/design/human-interface-guidelines/page-controls
Tabview page dots like in the weather app
Hello Baptiste-18,
Thank you for your question. You could accomplish your design by using a TabView with IndexViewStyle set to the appropriate PageIndexViewStyle to display the page control, and with its TabViewStyle set to .page for the paged scrolling style.
VStack {
TabView {
Text("One")
Text("Two")
Text("Three")
Text("Four")
Text("Five")
}
}
.indexViewStyle(PageIndexViewStyle(backgroundDisplayMode: .always))
.tabViewStyle(.page)
Please see Enhancing your app’s content with tab navigation for more information.
Thank you for your patience,
Richard Yeh Developer Technical Support