SwiftUI TabView with page style doesn't present dots on watchOS

Hi,

I have created a TabView with TabViewStyle.page. Is there a way to present the dots on watchOS? I have written some demo watchOS project:

import SwiftUI

@main
struct PageControllerWatchTestApp: App {
    var body: some Scene 
        WindowGroup {
            TabView {
                Color(.red)
                Color(.blue)
                Color(.orange)
            }.tabViewStyle(.page)
        }
    }
}

If I try the same code on iOS the dots are presented. Is there a way to enable the dots on watchOS?

I am using watchOS 9 Beta 4 with Xcode 14 Beta 4.

  • Xcode 14.0 Beta 5 didn't fix the problem.

Add a Comment

Replies

It might be a bug in watchOS 9.

If it’s not, then you can manually control the indicators by adding this parameter to the tab view style:

.tabViewStyle(.page(indexDisplayMode: .always))
  • Adding the TabViewStyle doesn't fix the problem, so it really looks like a watchOS 9 bug. I created the same project with Xcode 13.4.1 and watchOS 8. There everything looks fine. I have now create a feedback (FB11028017)

    Thanks for you help anyway.

Add a Comment

I was still able to replicate this watchOS 9 bug in Xcode 14.0 beta 6.

  • It’s fixed for me. Have you tried it on a device or on the simulator?

  • On the simulator and the live previews for Apple Watch, I'm not seeing the dots at the bottom of the screen for each of the TabViews to show how many tabs exits and to indicate which of the tabs is currently being displayed.

    I am able to swipe on either side to change which TabView is currently displayed, but no dots display. Are they hidden by default? Maybe I need to manually activate the dots to be visible.

  • Everything seems to be working fine in Xcode 14 RC. I'm glad to see that the bug got resolved!

Add a Comment

This was a watchOS 9 Beta bug and is fixed with the latest Beta version.