In SwiftUI, I am trying to place page Indicators on top of a bottom toolbar, but have not come to a resolution.
Paging Indicators

Right now, I have a tabview that organizes Views 1-7 horizontally, but the page indicators are on its own island at the bottom of the screen:
TabView {
View1()
View2()
View3()
View4()
View5()
View6()
View7()
}
.tabViewStyle(PageTabViewStyle())
.indexViewStyle(PageIndexViewStyle(backgroundDisplayMode: .always))
I am trying to place the indicators on top of a toolbar with other buttons like how the Apple Weather App has done it:
Apple Weather App

I have also tried using a NavigationView with the .toolbar(ToolbarItemGroup) modifier, but that has not worked for me either.
Please let me know if you can help me with this. Thanks
You can do this by wrapping a
UIPageControlin aUIViewRepresentable, and then overlay that over yourTabViewusing aZStackor a.overlaymodifier. You'll want to use.tabViewStyle(.page(indexDisplayMode: .never))to prevent the tab view from displaying its own page control.Here's a wrapper for
UIPageControl.And here's an example of how to use it: