0

Using iOS14.4.2, Swift5.3.2, Xcode12.4,

I am using SwiftUI's new PageTabView-styled TabView (see example-code below).

Everything works - except that I would like to move the control-indicators (i.e. little dots) to some other location on the screen.

How can you do that ?

And yes, I could do my own controls overlay of some sort - but isn't SwiftUI capable itself and natively ?

struct ContentView: View {
    var body: some View {
        TabView {
            Text("First")
            Text("Second")
            Text("Third")
            Text("Fourth")
        }
        .tabViewStyle(PageTabViewStyle(indexDisplayMode: .always))
        .indexViewStyle(PageIndexViewStyle(backgroundDisplayMode: .always))
    }
}
iKK
  • 6,394
  • 10
  • 58
  • 131
  • 1
    I have not seen such controls for dots yet, maybe in mature version of SwiftUI – ios coder Apr 02 '21 at 15:13
  • ok, seems we have to wait and hope for an improved PageView... – iKK Apr 02 '21 at 20:08
  • I would not wait in case, i would make custom one, maybe it would be never happen to get that control even form apple, and even if that happens we do not know what and which level of control apple would offer! – ios coder Apr 02 '21 at 20:11
  • yes I agree, ...it's just that iOS14 page-control dots are quite animated if the page-number exceeds 8. And that's quite an effort to reproduce. I'll do my best ;) – iKK Apr 02 '21 at 21:59

0 Answers0